mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-5319f1ba23b5304e/out/
paparazzi.rs

1#![doc = "MAVLink paparazzi dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::bitflags;
9use mavlink_core::{
10    bytes::Bytes, bytes_mut::BytesMut, types::CharArray, MavlinkVersion, Message, MessageData,
11};
12#[allow(unused_imports)]
13use num_derive::FromPrimitive;
14#[allow(unused_imports)]
15use num_derive::ToPrimitive;
16#[allow(unused_imports)]
17use num_traits::FromPrimitive;
18#[allow(unused_imports)]
19use num_traits::ToPrimitive;
20#[cfg(feature = "serde")]
21use serde::{Deserialize, Serialize};
22#[cfg(feature = "ts")]
23use ts_rs::TS;
24pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
25#[cfg_attr(feature = "ts", derive(TS))]
26#[cfg_attr(feature = "ts", ts(export))]
27#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
28#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29#[cfg_attr(feature = "serde", serde(tag = "type"))]
30#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31#[repr(u32)]
32#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
33pub enum ActuatorConfiguration {
34    #[doc = "Do nothing."]
35    ACTUATOR_CONFIGURATION_NONE = 0,
36    #[doc = "Command the actuator to beep now."]
37    ACTUATOR_CONFIGURATION_BEEP = 1,
38    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
39    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
40    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
41    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
42    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
43    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
44    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
45    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
46}
47impl ActuatorConfiguration {
48    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
49}
50impl Default for ActuatorConfiguration {
51    fn default() -> Self {
52        Self::DEFAULT
53    }
54}
55#[cfg_attr(feature = "ts", derive(TS))]
56#[cfg_attr(feature = "ts", ts(export))]
57#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
58#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
59#[cfg_attr(feature = "serde", serde(tag = "type"))]
60#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
61#[repr(u32)]
62#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
63pub enum ActuatorOutputFunction {
64    #[doc = "No function (disabled)."]
65    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
66    #[doc = "Motor 1"]
67    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
68    #[doc = "Motor 2"]
69    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
70    #[doc = "Motor 3"]
71    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
72    #[doc = "Motor 4"]
73    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
74    #[doc = "Motor 5"]
75    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
76    #[doc = "Motor 6"]
77    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
78    #[doc = "Motor 7"]
79    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
80    #[doc = "Motor 8"]
81    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
82    #[doc = "Motor 9"]
83    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
84    #[doc = "Motor 10"]
85    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
86    #[doc = "Motor 11"]
87    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
88    #[doc = "Motor 12"]
89    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
90    #[doc = "Motor 13"]
91    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
92    #[doc = "Motor 14"]
93    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
94    #[doc = "Motor 15"]
95    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
96    #[doc = "Motor 16"]
97    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
98    #[doc = "Servo 1"]
99    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
100    #[doc = "Servo 2"]
101    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
102    #[doc = "Servo 3"]
103    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
104    #[doc = "Servo 4"]
105    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
106    #[doc = "Servo 5"]
107    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
108    #[doc = "Servo 6"]
109    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
110    #[doc = "Servo 7"]
111    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
112    #[doc = "Servo 8"]
113    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
114    #[doc = "Servo 9"]
115    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
116    #[doc = "Servo 10"]
117    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
118    #[doc = "Servo 11"]
119    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
120    #[doc = "Servo 12"]
121    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
122    #[doc = "Servo 13"]
123    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
124    #[doc = "Servo 14"]
125    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
126    #[doc = "Servo 15"]
127    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
128    #[doc = "Servo 16"]
129    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
130}
131impl ActuatorOutputFunction {
132    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
133}
134impl Default for ActuatorOutputFunction {
135    fn default() -> Self {
136        Self::DEFAULT
137    }
138}
139#[cfg_attr(feature = "ts", derive(TS))]
140#[cfg_attr(feature = "ts", ts(export))]
141#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
142#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
143#[cfg_attr(feature = "serde", serde(tag = "type"))]
144#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
145#[repr(u32)]
146#[doc = "Enumeration of the ADSB altimeter types"]
147pub enum AdsbAltitudeType {
148    #[doc = "Altitude reported from a Baro source using QNH reference"]
149    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
150    #[doc = "Altitude reported from a GNSS source"]
151    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
152}
153impl AdsbAltitudeType {
154    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
155}
156impl Default for AdsbAltitudeType {
157    fn default() -> Self {
158        Self::DEFAULT
159    }
160}
161#[cfg_attr(feature = "ts", derive(TS))]
162#[cfg_attr(feature = "ts", ts(export))]
163#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
164#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
165#[cfg_attr(feature = "serde", serde(tag = "type"))]
166#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
167#[repr(u32)]
168#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
169pub enum AdsbEmitterType {
170    ADSB_EMITTER_TYPE_NO_INFO = 0,
171    ADSB_EMITTER_TYPE_LIGHT = 1,
172    ADSB_EMITTER_TYPE_SMALL = 2,
173    ADSB_EMITTER_TYPE_LARGE = 3,
174    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
175    ADSB_EMITTER_TYPE_HEAVY = 5,
176    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
177    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
178    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
179    ADSB_EMITTER_TYPE_GLIDER = 9,
180    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
181    ADSB_EMITTER_TYPE_PARACHUTE = 11,
182    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
183    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
184    ADSB_EMITTER_TYPE_UAV = 14,
185    ADSB_EMITTER_TYPE_SPACE = 15,
186    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
187    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
188    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
189    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
190}
191impl AdsbEmitterType {
192    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
193}
194impl Default for AdsbEmitterType {
195    fn default() -> Self {
196        Self::DEFAULT
197    }
198}
199bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
200impl AdsbFlags {
201    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
202}
203impl Default for AdsbFlags {
204    fn default() -> Self {
205        Self::DEFAULT
206    }
207}
208bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
209impl AisFlags {
210    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
211}
212impl Default for AisFlags {
213    fn default() -> Self {
214        Self::DEFAULT
215    }
216}
217#[cfg_attr(feature = "ts", derive(TS))]
218#[cfg_attr(feature = "ts", ts(export))]
219#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
220#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
221#[cfg_attr(feature = "serde", serde(tag = "type"))]
222#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
223#[repr(u32)]
224#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
225pub enum AisNavStatus {
226    #[doc = "Under way using engine."]
227    UNDER_WAY = 0,
228    AIS_NAV_ANCHORED = 1,
229    AIS_NAV_UN_COMMANDED = 2,
230    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
231    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
232    AIS_NAV_MOORED = 5,
233    AIS_NAV_AGROUND = 6,
234    AIS_NAV_FISHING = 7,
235    AIS_NAV_SAILING = 8,
236    AIS_NAV_RESERVED_HSC = 9,
237    AIS_NAV_RESERVED_WIG = 10,
238    AIS_NAV_RESERVED_1 = 11,
239    AIS_NAV_RESERVED_2 = 12,
240    AIS_NAV_RESERVED_3 = 13,
241    #[doc = "Search And Rescue Transponder."]
242    AIS_NAV_AIS_SART = 14,
243    #[doc = "Not available (default)."]
244    AIS_NAV_UNKNOWN = 15,
245}
246impl AisNavStatus {
247    pub const DEFAULT: Self = Self::UNDER_WAY;
248}
249impl Default for AisNavStatus {
250    fn default() -> Self {
251        Self::DEFAULT
252    }
253}
254#[cfg_attr(feature = "ts", derive(TS))]
255#[cfg_attr(feature = "ts", ts(export))]
256#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
257#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
258#[cfg_attr(feature = "serde", serde(tag = "type"))]
259#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
260#[repr(u32)]
261#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
262pub enum AisType {
263    #[doc = "Not available (default)."]
264    AIS_TYPE_UNKNOWN = 0,
265    AIS_TYPE_RESERVED_1 = 1,
266    AIS_TYPE_RESERVED_2 = 2,
267    AIS_TYPE_RESERVED_3 = 3,
268    AIS_TYPE_RESERVED_4 = 4,
269    AIS_TYPE_RESERVED_5 = 5,
270    AIS_TYPE_RESERVED_6 = 6,
271    AIS_TYPE_RESERVED_7 = 7,
272    AIS_TYPE_RESERVED_8 = 8,
273    AIS_TYPE_RESERVED_9 = 9,
274    AIS_TYPE_RESERVED_10 = 10,
275    AIS_TYPE_RESERVED_11 = 11,
276    AIS_TYPE_RESERVED_12 = 12,
277    AIS_TYPE_RESERVED_13 = 13,
278    AIS_TYPE_RESERVED_14 = 14,
279    AIS_TYPE_RESERVED_15 = 15,
280    AIS_TYPE_RESERVED_16 = 16,
281    AIS_TYPE_RESERVED_17 = 17,
282    AIS_TYPE_RESERVED_18 = 18,
283    AIS_TYPE_RESERVED_19 = 19,
284    #[doc = "Wing In Ground effect."]
285    AIS_TYPE_WIG = 20,
286    AIS_TYPE_WIG_HAZARDOUS_A = 21,
287    AIS_TYPE_WIG_HAZARDOUS_B = 22,
288    AIS_TYPE_WIG_HAZARDOUS_C = 23,
289    AIS_TYPE_WIG_HAZARDOUS_D = 24,
290    AIS_TYPE_WIG_RESERVED_1 = 25,
291    AIS_TYPE_WIG_RESERVED_2 = 26,
292    AIS_TYPE_WIG_RESERVED_3 = 27,
293    AIS_TYPE_WIG_RESERVED_4 = 28,
294    AIS_TYPE_WIG_RESERVED_5 = 29,
295    AIS_TYPE_FISHING = 30,
296    AIS_TYPE_TOWING = 31,
297    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
298    AIS_TYPE_TOWING_LARGE = 32,
299    #[doc = "Dredging or other underwater ops."]
300    AIS_TYPE_DREDGING = 33,
301    AIS_TYPE_DIVING = 34,
302    AIS_TYPE_MILITARY = 35,
303    AIS_TYPE_SAILING = 36,
304    AIS_TYPE_PLEASURE = 37,
305    AIS_TYPE_RESERVED_20 = 38,
306    AIS_TYPE_RESERVED_21 = 39,
307    #[doc = "High Speed Craft."]
308    AIS_TYPE_HSC = 40,
309    AIS_TYPE_HSC_HAZARDOUS_A = 41,
310    AIS_TYPE_HSC_HAZARDOUS_B = 42,
311    AIS_TYPE_HSC_HAZARDOUS_C = 43,
312    AIS_TYPE_HSC_HAZARDOUS_D = 44,
313    AIS_TYPE_HSC_RESERVED_1 = 45,
314    AIS_TYPE_HSC_RESERVED_2 = 46,
315    AIS_TYPE_HSC_RESERVED_3 = 47,
316    AIS_TYPE_HSC_RESERVED_4 = 48,
317    AIS_TYPE_HSC_UNKNOWN = 49,
318    AIS_TYPE_PILOT = 50,
319    #[doc = "Search And Rescue vessel."]
320    AIS_TYPE_SAR = 51,
321    AIS_TYPE_TUG = 52,
322    AIS_TYPE_PORT_TENDER = 53,
323    #[doc = "Anti-pollution equipment."]
324    AIS_TYPE_ANTI_POLLUTION = 54,
325    AIS_TYPE_LAW_ENFORCEMENT = 55,
326    AIS_TYPE_SPARE_LOCAL_1 = 56,
327    AIS_TYPE_SPARE_LOCAL_2 = 57,
328    AIS_TYPE_MEDICAL_TRANSPORT = 58,
329    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
330    AIS_TYPE_NONECOMBATANT = 59,
331    AIS_TYPE_PASSENGER = 60,
332    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
333    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
334    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
335    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
336    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
337    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
338    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
339    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
340    AIS_TYPE_PASSENGER_UNKNOWN = 69,
341    AIS_TYPE_CARGO = 70,
342    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
343    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
344    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
345    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
346    AIS_TYPE_CARGO_RESERVED_1 = 75,
347    AIS_TYPE_CARGO_RESERVED_2 = 76,
348    AIS_TYPE_CARGO_RESERVED_3 = 77,
349    AIS_TYPE_CARGO_RESERVED_4 = 78,
350    AIS_TYPE_CARGO_UNKNOWN = 79,
351    AIS_TYPE_TANKER = 80,
352    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
353    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
354    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
355    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
356    AIS_TYPE_TANKER_RESERVED_1 = 85,
357    AIS_TYPE_TANKER_RESERVED_2 = 86,
358    AIS_TYPE_TANKER_RESERVED_3 = 87,
359    AIS_TYPE_TANKER_RESERVED_4 = 88,
360    AIS_TYPE_TANKER_UNKNOWN = 89,
361    AIS_TYPE_OTHER = 90,
362    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
363    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
364    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
365    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
366    AIS_TYPE_OTHER_RESERVED_1 = 95,
367    AIS_TYPE_OTHER_RESERVED_2 = 96,
368    AIS_TYPE_OTHER_RESERVED_3 = 97,
369    AIS_TYPE_OTHER_RESERVED_4 = 98,
370    AIS_TYPE_OTHER_UNKNOWN = 99,
371}
372impl AisType {
373    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
374}
375impl Default for AisType {
376    fn default() -> Self {
377        Self::DEFAULT
378    }
379}
380bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
381impl AttitudeTargetTypemask {
382    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
383}
384impl Default for AttitudeTargetTypemask {
385    fn default() -> Self {
386        Self::DEFAULT
387    }
388}
389#[cfg_attr(feature = "ts", derive(TS))]
390#[cfg_attr(feature = "ts", ts(export))]
391#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
392#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
393#[cfg_attr(feature = "serde", serde(tag = "type"))]
394#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
395#[repr(u32)]
396#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
397pub enum AutotuneAxis {
398    #[doc = "Autotune roll axis."]
399    AUTOTUNE_AXIS_ROLL = 1,
400    #[doc = "Autotune pitch axis."]
401    AUTOTUNE_AXIS_PITCH = 2,
402    #[doc = "Autotune yaw axis."]
403    AUTOTUNE_AXIS_YAW = 4,
404}
405impl AutotuneAxis {
406    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
407}
408impl Default for AutotuneAxis {
409    fn default() -> Self {
410        Self::DEFAULT
411    }
412}
413bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
414impl CameraCapFlags {
415    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
416}
417impl Default for CameraCapFlags {
418    fn default() -> Self {
419        Self::DEFAULT
420    }
421}
422#[cfg_attr(feature = "ts", derive(TS))]
423#[cfg_attr(feature = "ts", ts(export))]
424#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
425#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
426#[cfg_attr(feature = "serde", serde(tag = "type"))]
427#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
428#[repr(u32)]
429#[doc = "Camera Modes."]
430pub enum CameraMode {
431    #[doc = "Camera is in image/photo capture mode."]
432    CAMERA_MODE_IMAGE = 0,
433    #[doc = "Camera is in video capture mode."]
434    CAMERA_MODE_VIDEO = 1,
435    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
436    CAMERA_MODE_IMAGE_SURVEY = 2,
437}
438impl CameraMode {
439    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
440}
441impl Default for CameraMode {
442    fn default() -> Self {
443        Self::DEFAULT
444    }
445}
446#[cfg_attr(feature = "ts", derive(TS))]
447#[cfg_attr(feature = "ts", ts(export))]
448#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
450#[cfg_attr(feature = "serde", serde(tag = "type"))]
451#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
452#[repr(u32)]
453#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
454pub enum CameraSource {
455    #[doc = "Default camera source."]
456    CAMERA_SOURCE_DEFAULT = 0,
457    #[doc = "RGB camera source."]
458    CAMERA_SOURCE_RGB = 1,
459    #[doc = "IR camera source."]
460    CAMERA_SOURCE_IR = 2,
461    #[doc = "NDVI camera source."]
462    CAMERA_SOURCE_NDVI = 3,
463}
464impl CameraSource {
465    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
466}
467impl Default for CameraSource {
468    fn default() -> Self {
469        Self::DEFAULT
470    }
471}
472#[cfg_attr(feature = "ts", derive(TS))]
473#[cfg_attr(feature = "ts", ts(export))]
474#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
476#[cfg_attr(feature = "serde", serde(tag = "type"))]
477#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
478#[repr(u32)]
479#[doc = "Camera tracking modes"]
480pub enum CameraTrackingMode {
481    #[doc = "Not tracking"]
482    CAMERA_TRACKING_MODE_NONE = 0,
483    #[doc = "Target is a point"]
484    CAMERA_TRACKING_MODE_POINT = 1,
485    #[doc = "Target is a rectangle"]
486    CAMERA_TRACKING_MODE_RECTANGLE = 2,
487}
488impl CameraTrackingMode {
489    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
490}
491impl Default for CameraTrackingMode {
492    fn default() -> Self {
493        Self::DEFAULT
494    }
495}
496#[cfg_attr(feature = "ts", derive(TS))]
497#[cfg_attr(feature = "ts", ts(export))]
498#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
500#[cfg_attr(feature = "serde", serde(tag = "type"))]
501#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
502#[repr(u32)]
503#[doc = "Camera tracking status flags"]
504pub enum CameraTrackingStatusFlags {
505    #[doc = "Camera is not tracking"]
506    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
507    #[doc = "Camera is tracking"]
508    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
509    #[doc = "Camera tracking in error state"]
510    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
511}
512impl CameraTrackingStatusFlags {
513    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
514}
515impl Default for CameraTrackingStatusFlags {
516    fn default() -> Self {
517        Self::DEFAULT
518    }
519}
520bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
521impl CameraTrackingTargetData {
522    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
523}
524impl Default for CameraTrackingTargetData {
525    fn default() -> Self {
526        Self::DEFAULT
527    }
528}
529#[cfg_attr(feature = "ts", derive(TS))]
530#[cfg_attr(feature = "ts", ts(export))]
531#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
532#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
533#[cfg_attr(feature = "serde", serde(tag = "type"))]
534#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
535#[repr(u32)]
536#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
537pub enum CameraZoomType {
538    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
539    ZOOM_TYPE_STEP = 0,
540    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
541    ZOOM_TYPE_CONTINUOUS = 1,
542    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
543    ZOOM_TYPE_RANGE = 2,
544    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
545    ZOOM_TYPE_FOCAL_LENGTH = 3,
546    #[doc = "Zoom value as horizontal field of view in degrees."]
547    ZOOM_TYPE_HORIZONTAL_FOV = 4,
548}
549impl CameraZoomType {
550    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
551}
552impl Default for CameraZoomType {
553    fn default() -> Self {
554        Self::DEFAULT
555    }
556}
557#[cfg_attr(feature = "ts", derive(TS))]
558#[cfg_attr(feature = "ts", ts(export))]
559#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
560#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
561#[cfg_attr(feature = "serde", serde(tag = "type"))]
562#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
563#[repr(u32)]
564pub enum CanFilterOp {
565    CAN_FILTER_REPLACE = 0,
566    CAN_FILTER_ADD = 1,
567    CAN_FILTER_REMOVE = 2,
568}
569impl CanFilterOp {
570    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
571}
572impl Default for CanFilterOp {
573    fn default() -> Self {
574        Self::DEFAULT
575    }
576}
577#[cfg_attr(feature = "ts", derive(TS))]
578#[cfg_attr(feature = "ts", ts(export))]
579#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
580#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
581#[cfg_attr(feature = "serde", serde(tag = "type"))]
582#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
583#[repr(u32)]
584#[doc = "Possible responses from a CELLULAR_CONFIG message."]
585pub enum CellularConfigResponse {
586    #[doc = "Changes accepted."]
587    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
588    #[doc = "Invalid APN."]
589    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
590    #[doc = "Invalid PIN."]
591    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
592    #[doc = "Changes rejected."]
593    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
594    #[doc = "PUK is required to unblock SIM card."]
595    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
596}
597impl CellularConfigResponse {
598    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
599}
600impl Default for CellularConfigResponse {
601    fn default() -> Self {
602        Self::DEFAULT
603    }
604}
605#[cfg_attr(feature = "ts", derive(TS))]
606#[cfg_attr(feature = "ts", ts(export))]
607#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
608#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
609#[cfg_attr(feature = "serde", serde(tag = "type"))]
610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
611#[repr(u32)]
612#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
613pub enum CellularNetworkFailedReason {
614    #[doc = "No error"]
615    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
616    #[doc = "Error state is unknown"]
617    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
618    #[doc = "SIM is required for the modem but missing"]
619    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
620    #[doc = "SIM is available, but not usable for connection"]
621    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
622}
623impl CellularNetworkFailedReason {
624    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
625}
626impl Default for CellularNetworkFailedReason {
627    fn default() -> Self {
628        Self::DEFAULT
629    }
630}
631#[cfg_attr(feature = "ts", derive(TS))]
632#[cfg_attr(feature = "ts", ts(export))]
633#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
634#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
635#[cfg_attr(feature = "serde", serde(tag = "type"))]
636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
637#[repr(u32)]
638#[doc = "Cellular network radio type"]
639pub enum CellularNetworkRadioType {
640    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
641    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
642    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
643    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
644    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
645}
646impl CellularNetworkRadioType {
647    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
648}
649impl Default for CellularNetworkRadioType {
650    fn default() -> Self {
651        Self::DEFAULT
652    }
653}
654#[cfg_attr(feature = "ts", derive(TS))]
655#[cfg_attr(feature = "ts", ts(export))]
656#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
657#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
658#[cfg_attr(feature = "serde", serde(tag = "type"))]
659#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
660#[repr(u32)]
661#[doc = "These flags encode the cellular network status"]
662pub enum CellularStatusFlag {
663    #[doc = "State unknown or not reportable."]
664    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
665    #[doc = "Modem is unusable"]
666    CELLULAR_STATUS_FLAG_FAILED = 1,
667    #[doc = "Modem is being initialized"]
668    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
669    #[doc = "Modem is locked"]
670    CELLULAR_STATUS_FLAG_LOCKED = 3,
671    #[doc = "Modem is not enabled and is powered down"]
672    CELLULAR_STATUS_FLAG_DISABLED = 4,
673    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
674    CELLULAR_STATUS_FLAG_DISABLING = 5,
675    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
676    CELLULAR_STATUS_FLAG_ENABLING = 6,
677    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
678    CELLULAR_STATUS_FLAG_ENABLED = 7,
679    #[doc = "Modem is searching for a network provider to register"]
680    CELLULAR_STATUS_FLAG_SEARCHING = 8,
681    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
682    CELLULAR_STATUS_FLAG_REGISTERED = 9,
683    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
684    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
685    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
686    CELLULAR_STATUS_FLAG_CONNECTING = 11,
687    #[doc = "One or more packet data bearers is active and connected"]
688    CELLULAR_STATUS_FLAG_CONNECTED = 12,
689}
690impl CellularStatusFlag {
691    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
692}
693impl Default for CellularStatusFlag {
694    fn default() -> Self {
695        Self::DEFAULT
696    }
697}
698#[cfg_attr(feature = "ts", derive(TS))]
699#[cfg_attr(feature = "ts", ts(export))]
700#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
701#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
702#[cfg_attr(feature = "serde", serde(tag = "type"))]
703#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
704#[repr(u32)]
705#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
706pub enum CompMetadataType {
707    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
708    COMP_METADATA_TYPE_GENERAL = 0,
709    #[doc = "Parameter meta data."]
710    COMP_METADATA_TYPE_PARAMETER = 1,
711    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
712    COMP_METADATA_TYPE_COMMANDS = 2,
713    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
714    COMP_METADATA_TYPE_PERIPHERALS = 3,
715    #[doc = "Meta data for the events interface."]
716    COMP_METADATA_TYPE_EVENTS = 4,
717    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
718    COMP_METADATA_TYPE_ACTUATORS = 5,
719}
720impl CompMetadataType {
721    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
722}
723impl Default for CompMetadataType {
724    fn default() -> Self {
725        Self::DEFAULT
726    }
727}
728#[cfg_attr(feature = "ts", derive(TS))]
729#[cfg_attr(feature = "ts", ts(export))]
730#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
731#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
732#[cfg_attr(feature = "serde", serde(tag = "type"))]
733#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
734#[repr(u32)]
735#[doc = "Indicates the ESC connection type."]
736pub enum EscConnectionType {
737    #[doc = "Traditional PPM ESC."]
738    ESC_CONNECTION_TYPE_PPM = 0,
739    #[doc = "Serial Bus connected ESC."]
740    ESC_CONNECTION_TYPE_SERIAL = 1,
741    #[doc = "One Shot PPM ESC."]
742    ESC_CONNECTION_TYPE_ONESHOT = 2,
743    #[doc = "I2C ESC."]
744    ESC_CONNECTION_TYPE_I2C = 3,
745    #[doc = "CAN-Bus ESC."]
746    ESC_CONNECTION_TYPE_CAN = 4,
747    #[doc = "DShot ESC."]
748    ESC_CONNECTION_TYPE_DSHOT = 5,
749}
750impl EscConnectionType {
751    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
752}
753impl Default for EscConnectionType {
754    fn default() -> Self {
755        Self::DEFAULT
756    }
757}
758bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
759impl EscFailureFlags {
760    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
761}
762impl Default for EscFailureFlags {
763    fn default() -> Self {
764        Self::DEFAULT
765    }
766}
767bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
768impl EstimatorStatusFlags {
769    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
770}
771impl Default for EstimatorStatusFlags {
772    fn default() -> Self {
773        Self::DEFAULT
774    }
775}
776#[cfg_attr(feature = "ts", derive(TS))]
777#[cfg_attr(feature = "ts", ts(export))]
778#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
779#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
780#[cfg_attr(feature = "serde", serde(tag = "type"))]
781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
782#[repr(u32)]
783#[doc = "List of possible failure type to inject."]
784pub enum FailureType {
785    #[doc = "No failure injected, used to reset a previous failure."]
786    FAILURE_TYPE_OK = 0,
787    #[doc = "Sets unit off, so completely non-responsive."]
788    FAILURE_TYPE_OFF = 1,
789    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
790    FAILURE_TYPE_STUCK = 2,
791    #[doc = "Unit is reporting complete garbage."]
792    FAILURE_TYPE_GARBAGE = 3,
793    #[doc = "Unit is consistently wrong."]
794    FAILURE_TYPE_WRONG = 4,
795    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
796    FAILURE_TYPE_SLOW = 5,
797    #[doc = "Data of unit is delayed in time."]
798    FAILURE_TYPE_DELAYED = 6,
799    #[doc = "Unit is sometimes working, sometimes not."]
800    FAILURE_TYPE_INTERMITTENT = 7,
801}
802impl FailureType {
803    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
804}
805impl Default for FailureType {
806    fn default() -> Self {
807        Self::DEFAULT
808    }
809}
810#[cfg_attr(feature = "ts", derive(TS))]
811#[cfg_attr(feature = "ts", ts(export))]
812#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
813#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
814#[cfg_attr(feature = "serde", serde(tag = "type"))]
815#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
816#[repr(u32)]
817#[doc = "List of possible units where failures can be injected."]
818pub enum FailureUnit {
819    FAILURE_UNIT_SENSOR_GYRO = 0,
820    FAILURE_UNIT_SENSOR_ACCEL = 1,
821    FAILURE_UNIT_SENSOR_MAG = 2,
822    FAILURE_UNIT_SENSOR_BARO = 3,
823    FAILURE_UNIT_SENSOR_GPS = 4,
824    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
825    FAILURE_UNIT_SENSOR_VIO = 6,
826    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
827    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
828    FAILURE_UNIT_SYSTEM_BATTERY = 100,
829    FAILURE_UNIT_SYSTEM_MOTOR = 101,
830    FAILURE_UNIT_SYSTEM_SERVO = 102,
831    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
832    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
833    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
834}
835impl FailureUnit {
836    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
837}
838impl Default for FailureUnit {
839    fn default() -> Self {
840        Self::DEFAULT
841    }
842}
843#[cfg_attr(feature = "ts", derive(TS))]
844#[cfg_attr(feature = "ts", ts(export))]
845#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
846#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
847#[cfg_attr(feature = "serde", serde(tag = "type"))]
848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
849#[repr(u32)]
850pub enum FenceBreach {
851    #[doc = "No last fence breach"]
852    FENCE_BREACH_NONE = 0,
853    #[doc = "Breached minimum altitude"]
854    FENCE_BREACH_MINALT = 1,
855    #[doc = "Breached maximum altitude"]
856    FENCE_BREACH_MAXALT = 2,
857    #[doc = "Breached fence boundary"]
858    FENCE_BREACH_BOUNDARY = 3,
859}
860impl FenceBreach {
861    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
862}
863impl Default for FenceBreach {
864    fn default() -> Self {
865        Self::DEFAULT
866    }
867}
868#[cfg_attr(feature = "ts", derive(TS))]
869#[cfg_attr(feature = "ts", ts(export))]
870#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
871#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
872#[cfg_attr(feature = "serde", serde(tag = "type"))]
873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
874#[repr(u32)]
875#[doc = "Actions being taken to mitigate/prevent fence breach"]
876pub enum FenceMitigate {
877    #[doc = "Unknown"]
878    FENCE_MITIGATE_UNKNOWN = 0,
879    #[doc = "No actions being taken"]
880    FENCE_MITIGATE_NONE = 1,
881    #[doc = "Velocity limiting active to prevent breach"]
882    FENCE_MITIGATE_VEL_LIMIT = 2,
883}
884impl FenceMitigate {
885    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
886}
887impl Default for FenceMitigate {
888    fn default() -> Self {
889        Self::DEFAULT
890    }
891}
892#[cfg_attr(feature = "ts", derive(TS))]
893#[cfg_attr(feature = "ts", ts(export))]
894#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
895#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
896#[cfg_attr(feature = "serde", serde(tag = "type"))]
897#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
898#[repr(u32)]
899#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
900pub enum FenceType {
901    #[doc = "Maximum altitude fence"]
902    FENCE_TYPE_ALT_MAX = 1,
903    #[doc = "Circle fence"]
904    FENCE_TYPE_CIRCLE = 2,
905    #[doc = "Polygon fence"]
906    FENCE_TYPE_POLYGON = 4,
907    #[doc = "Minimum altitude fence"]
908    FENCE_TYPE_ALT_MIN = 8,
909}
910impl FenceType {
911    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
912}
913impl Default for FenceType {
914    fn default() -> Self {
915        Self::DEFAULT
916    }
917}
918#[cfg_attr(feature = "ts", derive(TS))]
919#[cfg_attr(feature = "ts", ts(export))]
920#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
921#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
922#[cfg_attr(feature = "serde", serde(tag = "type"))]
923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
924#[repr(u32)]
925#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
926pub enum FirmwareVersionType {
927    #[doc = "development release"]
928    FIRMWARE_VERSION_TYPE_DEV = 0,
929    #[doc = "alpha release"]
930    FIRMWARE_VERSION_TYPE_ALPHA = 64,
931    #[doc = "beta release"]
932    FIRMWARE_VERSION_TYPE_BETA = 128,
933    #[doc = "release candidate"]
934    FIRMWARE_VERSION_TYPE_RC = 192,
935    #[doc = "official stable release"]
936    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
937}
938impl FirmwareVersionType {
939    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
940}
941impl Default for FirmwareVersionType {
942    fn default() -> Self {
943        Self::DEFAULT
944    }
945}
946bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
947impl GimbalDeviceCapFlags {
948    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
949}
950impl Default for GimbalDeviceCapFlags {
951    fn default() -> Self {
952        Self::DEFAULT
953    }
954}
955bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
956impl GimbalDeviceErrorFlags {
957    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
958}
959impl Default for GimbalDeviceErrorFlags {
960    fn default() -> Self {
961        Self::DEFAULT
962    }
963}
964bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
965impl GimbalDeviceFlags {
966    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
967}
968impl Default for GimbalDeviceFlags {
969    fn default() -> Self {
970        Self::DEFAULT
971    }
972}
973bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
974impl GimbalManagerCapFlags {
975    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
976}
977impl Default for GimbalManagerCapFlags {
978    fn default() -> Self {
979        Self::DEFAULT
980    }
981}
982bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
983impl GimbalManagerFlags {
984    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
985}
986impl Default for GimbalManagerFlags {
987    fn default() -> Self {
988        Self::DEFAULT
989    }
990}
991#[cfg_attr(feature = "ts", derive(TS))]
992#[cfg_attr(feature = "ts", ts(export))]
993#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
995#[cfg_attr(feature = "serde", serde(tag = "type"))]
996#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
997#[repr(u32)]
998#[doc = "Type of GPS fix"]
999pub enum GpsFixType {
1000    #[doc = "No GPS connected"]
1001    GPS_FIX_TYPE_NO_GPS = 0,
1002    #[doc = "No position information, GPS is connected"]
1003    GPS_FIX_TYPE_NO_FIX = 1,
1004    #[doc = "2D position"]
1005    GPS_FIX_TYPE_2D_FIX = 2,
1006    #[doc = "3D position"]
1007    GPS_FIX_TYPE_3D_FIX = 3,
1008    #[doc = "DGPS/SBAS aided 3D position"]
1009    GPS_FIX_TYPE_DGPS = 4,
1010    #[doc = "RTK float, 3D position"]
1011    GPS_FIX_TYPE_RTK_FLOAT = 5,
1012    #[doc = "RTK Fixed, 3D position"]
1013    GPS_FIX_TYPE_RTK_FIXED = 6,
1014    #[doc = "Static fixed, typically used for base stations"]
1015    GPS_FIX_TYPE_STATIC = 7,
1016    #[doc = "PPP, 3D position."]
1017    GPS_FIX_TYPE_PPP = 8,
1018}
1019impl GpsFixType {
1020    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1021}
1022impl Default for GpsFixType {
1023    fn default() -> Self {
1024        Self::DEFAULT
1025    }
1026}
1027bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1028impl GpsInputIgnoreFlags {
1029    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1030}
1031impl Default for GpsInputIgnoreFlags {
1032    fn default() -> Self {
1033        Self::DEFAULT
1034    }
1035}
1036#[cfg_attr(feature = "ts", derive(TS))]
1037#[cfg_attr(feature = "ts", ts(export))]
1038#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1039#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1040#[cfg_attr(feature = "serde", serde(tag = "type"))]
1041#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1042#[repr(u32)]
1043#[doc = "Gripper actions."]
1044pub enum GripperActions {
1045    #[doc = "Gripper release cargo."]
1046    GRIPPER_ACTION_RELEASE = 0,
1047    #[doc = "Gripper grab onto cargo."]
1048    GRIPPER_ACTION_GRAB = 1,
1049}
1050impl GripperActions {
1051    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1052}
1053impl Default for GripperActions {
1054    fn default() -> Self {
1055        Self::DEFAULT
1056    }
1057}
1058bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1059impl HighresImuUpdatedFlags {
1060    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1061}
1062impl Default for HighresImuUpdatedFlags {
1063    fn default() -> Self {
1064        Self::DEFAULT
1065    }
1066}
1067bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1068impl HilActuatorControlsFlags {
1069    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1070}
1071impl Default for HilActuatorControlsFlags {
1072    fn default() -> Self {
1073        Self::DEFAULT
1074    }
1075}
1076bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1077impl HilSensorUpdatedFlags {
1078    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1079}
1080impl Default for HilSensorUpdatedFlags {
1081    fn default() -> Self {
1082        Self::DEFAULT
1083    }
1084}
1085bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1086impl HlFailureFlag {
1087    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1088}
1089impl Default for HlFailureFlag {
1090    fn default() -> Self {
1091        Self::DEFAULT
1092    }
1093}
1094bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1095impl IlluminatorErrorFlags {
1096    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1097}
1098impl Default for IlluminatorErrorFlags {
1099    fn default() -> Self {
1100        Self::DEFAULT
1101    }
1102}
1103#[cfg_attr(feature = "ts", derive(TS))]
1104#[cfg_attr(feature = "ts", ts(export))]
1105#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1106#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1107#[cfg_attr(feature = "serde", serde(tag = "type"))]
1108#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1109#[repr(u32)]
1110#[doc = "Modes of illuminator"]
1111pub enum IlluminatorMode {
1112    #[doc = "Illuminator mode is not specified/unknown"]
1113    ILLUMINATOR_MODE_UNKNOWN = 0,
1114    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1115    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1116    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1117    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1118}
1119impl IlluminatorMode {
1120    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1121}
1122impl Default for IlluminatorMode {
1123    fn default() -> Self {
1124        Self::DEFAULT
1125    }
1126}
1127#[cfg_attr(feature = "ts", derive(TS))]
1128#[cfg_attr(feature = "ts", ts(export))]
1129#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1131#[cfg_attr(feature = "serde", serde(tag = "type"))]
1132#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1133#[repr(u32)]
1134#[doc = "Type of landing target"]
1135pub enum LandingTargetType {
1136    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1137    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1138    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1139    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1140    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1141    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1142    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1143    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1144}
1145impl LandingTargetType {
1146    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1147}
1148impl Default for LandingTargetType {
1149    fn default() -> Self {
1150        Self::DEFAULT
1151    }
1152}
1153#[cfg_attr(feature = "ts", derive(TS))]
1154#[cfg_attr(feature = "ts", ts(export))]
1155#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1157#[cfg_attr(feature = "serde", serde(tag = "type"))]
1158#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1159#[repr(u32)]
1160pub enum MagCalStatus {
1161    MAG_CAL_NOT_STARTED = 0,
1162    MAG_CAL_WAITING_TO_START = 1,
1163    MAG_CAL_RUNNING_STEP_ONE = 2,
1164    MAG_CAL_RUNNING_STEP_TWO = 3,
1165    MAG_CAL_SUCCESS = 4,
1166    MAG_CAL_FAILED = 5,
1167    MAG_CAL_BAD_ORIENTATION = 6,
1168    MAG_CAL_BAD_RADIUS = 7,
1169}
1170impl MagCalStatus {
1171    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1172}
1173impl Default for MagCalStatus {
1174    fn default() -> Self {
1175        Self::DEFAULT
1176    }
1177}
1178#[cfg_attr(feature = "ts", derive(TS))]
1179#[cfg_attr(feature = "ts", ts(export))]
1180#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1181#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1182#[cfg_attr(feature = "serde", serde(tag = "type"))]
1183#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1184#[repr(u32)]
1185pub enum MavArmAuthDeniedReason {
1186    #[doc = "Not a specific reason"]
1187    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1188    #[doc = "Authorizer will send the error as string to GCS"]
1189    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1190    #[doc = "At least one waypoint have a invalid value"]
1191    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1192    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1193    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1194    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1195    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1196    #[doc = "Weather is not good to fly"]
1197    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1198}
1199impl MavArmAuthDeniedReason {
1200    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1201}
1202impl Default for MavArmAuthDeniedReason {
1203    fn default() -> Self {
1204        Self::DEFAULT
1205    }
1206}
1207#[cfg_attr(feature = "ts", derive(TS))]
1208#[cfg_attr(feature = "ts", ts(export))]
1209#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1210#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1211#[cfg_attr(feature = "serde", serde(tag = "type"))]
1212#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1213#[repr(u32)]
1214#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1215pub enum MavAutopilot {
1216    #[doc = "Generic autopilot, full support for everything"]
1217    MAV_AUTOPILOT_GENERIC = 0,
1218    #[doc = "Reserved for future use."]
1219    MAV_AUTOPILOT_RESERVED = 1,
1220    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1221    MAV_AUTOPILOT_SLUGS = 2,
1222    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1223    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1224    #[doc = "OpenPilot, <http://openpilot.org>"]
1225    MAV_AUTOPILOT_OPENPILOT = 4,
1226    #[doc = "Generic autopilot only supporting simple waypoints"]
1227    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1228    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1229    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1230    #[doc = "Generic autopilot supporting the full mission command set"]
1231    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1232    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1233    MAV_AUTOPILOT_INVALID = 8,
1234    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1235    MAV_AUTOPILOT_PPZ = 9,
1236    #[doc = "UAV Dev Board"]
1237    MAV_AUTOPILOT_UDB = 10,
1238    #[doc = "FlexiPilot"]
1239    MAV_AUTOPILOT_FP = 11,
1240    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1241    MAV_AUTOPILOT_PX4 = 12,
1242    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1243    MAV_AUTOPILOT_SMACCMPILOT = 13,
1244    #[doc = "AutoQuad -- <http://autoquad.org>"]
1245    MAV_AUTOPILOT_AUTOQUAD = 14,
1246    #[doc = "Armazila -- <http://armazila.com>"]
1247    MAV_AUTOPILOT_ARMAZILA = 15,
1248    #[doc = "Aerob -- <http://aerob.ru>"]
1249    MAV_AUTOPILOT_AEROB = 16,
1250    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1251    MAV_AUTOPILOT_ASLUAV = 17,
1252    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1253    MAV_AUTOPILOT_SMARTAP = 18,
1254    #[doc = "AirRails - <http://uaventure.com>"]
1255    MAV_AUTOPILOT_AIRRAILS = 19,
1256    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1257    MAV_AUTOPILOT_REFLEX = 20,
1258}
1259impl MavAutopilot {
1260    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1261}
1262impl Default for MavAutopilot {
1263    fn default() -> Self {
1264        Self::DEFAULT
1265    }
1266}
1267#[cfg_attr(feature = "ts", derive(TS))]
1268#[cfg_attr(feature = "ts", ts(export))]
1269#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1271#[cfg_attr(feature = "serde", serde(tag = "type"))]
1272#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1273#[repr(u32)]
1274#[doc = "Enumeration for battery charge states."]
1275pub enum MavBatteryChargeState {
1276    #[doc = "Low battery state is not provided"]
1277    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1278    #[doc = "Battery is not in low state. Normal operation."]
1279    MAV_BATTERY_CHARGE_STATE_OK = 1,
1280    #[doc = "Battery state is low, warn and monitor close."]
1281    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1282    #[doc = "Battery state is critical, return or abort immediately."]
1283    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1284    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1285    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1286    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1287    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1288    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1289    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1290    #[doc = "Battery is charging."]
1291    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1292}
1293impl MavBatteryChargeState {
1294    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1295}
1296impl Default for MavBatteryChargeState {
1297    fn default() -> Self {
1298        Self::DEFAULT
1299    }
1300}
1301bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1302impl MavBatteryFault {
1303    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1304}
1305impl Default for MavBatteryFault {
1306    fn default() -> Self {
1307        Self::DEFAULT
1308    }
1309}
1310#[cfg_attr(feature = "ts", derive(TS))]
1311#[cfg_attr(feature = "ts", ts(export))]
1312#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1313#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1314#[cfg_attr(feature = "serde", serde(tag = "type"))]
1315#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1316#[repr(u32)]
1317#[doc = "Enumeration of battery functions"]
1318pub enum MavBatteryFunction {
1319    #[doc = "Battery function is unknown"]
1320    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1321    #[doc = "Battery supports all flight systems"]
1322    MAV_BATTERY_FUNCTION_ALL = 1,
1323    #[doc = "Battery for the propulsion system"]
1324    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1325    #[doc = "Avionics battery"]
1326    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1327    #[doc = "Payload battery"]
1328    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1329}
1330impl MavBatteryFunction {
1331    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1332}
1333impl Default for MavBatteryFunction {
1334    fn default() -> Self {
1335        Self::DEFAULT
1336    }
1337}
1338#[cfg_attr(feature = "ts", derive(TS))]
1339#[cfg_attr(feature = "ts", ts(export))]
1340#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1341#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1342#[cfg_attr(feature = "serde", serde(tag = "type"))]
1343#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1344#[repr(u32)]
1345#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1346pub enum MavBatteryMode {
1347    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1348    MAV_BATTERY_MODE_UNKNOWN = 0,
1349    #[doc = "Battery is auto discharging (towards storage level)."]
1350    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1351    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1352    MAV_BATTERY_MODE_HOT_SWAP = 2,
1353}
1354impl MavBatteryMode {
1355    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1356}
1357impl Default for MavBatteryMode {
1358    fn default() -> Self {
1359        Self::DEFAULT
1360    }
1361}
1362#[cfg_attr(feature = "ts", derive(TS))]
1363#[cfg_attr(feature = "ts", ts(export))]
1364#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1365#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1366#[cfg_attr(feature = "serde", serde(tag = "type"))]
1367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1368#[repr(u32)]
1369#[doc = "Enumeration of battery types"]
1370pub enum MavBatteryType {
1371    #[doc = "Not specified."]
1372    MAV_BATTERY_TYPE_UNKNOWN = 0,
1373    #[doc = "Lithium polymer battery"]
1374    MAV_BATTERY_TYPE_LIPO = 1,
1375    #[doc = "Lithium-iron-phosphate battery"]
1376    MAV_BATTERY_TYPE_LIFE = 2,
1377    #[doc = "Lithium-ION battery"]
1378    MAV_BATTERY_TYPE_LION = 3,
1379    #[doc = "Nickel metal hydride battery"]
1380    MAV_BATTERY_TYPE_NIMH = 4,
1381}
1382impl MavBatteryType {
1383    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1384}
1385impl Default for MavBatteryType {
1386    fn default() -> Self {
1387        Self::DEFAULT
1388    }
1389}
1390#[cfg_attr(feature = "ts", derive(TS))]
1391#[cfg_attr(feature = "ts", ts(export))]
1392#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1393#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1394#[cfg_attr(feature = "serde", serde(tag = "type"))]
1395#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1396#[repr(u32)]
1397#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1398pub enum MavCmd {
1399    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1400    MAV_CMD_NAV_WAYPOINT = 16,
1401    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1402    MAV_CMD_NAV_LOITER_UNLIM = 17,
1403    #[doc = "Loiter around this waypoint for X turns"]
1404    MAV_CMD_NAV_LOITER_TURNS = 18,
1405    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1406    MAV_CMD_NAV_LOITER_TIME = 19,
1407    #[doc = "Return to launch location"]
1408    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1409    #[doc = "Land at location."]
1410    MAV_CMD_NAV_LAND = 21,
1411    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1412    MAV_CMD_NAV_TAKEOFF = 22,
1413    #[doc = "Land at local position (local frame only)"]
1414    MAV_CMD_NAV_LAND_LOCAL = 23,
1415    #[doc = "Takeoff from local position (local frame only)"]
1416    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1417    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1418    MAV_CMD_NAV_FOLLOW = 25,
1419    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1420    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1421    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1422    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1423    #[doc = "Begin following a target"]
1424    MAV_CMD_DO_FOLLOW = 32,
1425    #[doc = "Reposition the MAV after a follow target command has been sent"]
1426    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1427    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1428    MAV_CMD_DO_ORBIT = 34,
1429    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1430    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1431    MAV_CMD_NAV_ROI = 80,
1432    #[doc = "Control autonomous path planning on the MAV."]
1433    MAV_CMD_NAV_PATHPLANNING = 81,
1434    #[doc = "Navigate to waypoint using a spline path."]
1435    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1436    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1437    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1438    #[doc = "Land using VTOL mode"]
1439    MAV_CMD_NAV_VTOL_LAND = 85,
1440    #[doc = "hand control over to an external controller"]
1441    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1442    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1443    MAV_CMD_NAV_DELAY = 93,
1444    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1445    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1446    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1447    MAV_CMD_NAV_LAST = 95,
1448    #[doc = "Delay mission state machine."]
1449    MAV_CMD_CONDITION_DELAY = 112,
1450    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1451    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1452    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1453    MAV_CMD_CONDITION_DISTANCE = 114,
1454    #[doc = "Reach a certain target angle."]
1455    MAV_CMD_CONDITION_YAW = 115,
1456    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1457    MAV_CMD_CONDITION_LAST = 159,
1458    #[doc = "Set system mode."]
1459    MAV_CMD_DO_SET_MODE = 176,
1460    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1461    MAV_CMD_DO_JUMP = 177,
1462    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1463    MAV_CMD_DO_CHANGE_SPEED = 178,
1464    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1465    MAV_CMD_DO_SET_HOME = 179,
1466    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1467    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1468    MAV_CMD_DO_SET_PARAMETER = 180,
1469    #[doc = "Set a relay to a condition."]
1470    MAV_CMD_DO_SET_RELAY = 181,
1471    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1472    MAV_CMD_DO_REPEAT_RELAY = 182,
1473    #[doc = "Set a servo to a desired PWM value."]
1474    MAV_CMD_DO_SET_SERVO = 183,
1475    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1476    MAV_CMD_DO_REPEAT_SERVO = 184,
1477    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1478    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1479    #[doc = "Change altitude set point."]
1480    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1481    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1482    MAV_CMD_DO_SET_ACTUATOR = 187,
1483    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1484    MAV_CMD_DO_RETURN_PATH_START = 188,
1485    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1486    MAV_CMD_DO_LAND_START = 189,
1487    #[doc = "Mission command to perform a landing from a rally point."]
1488    MAV_CMD_DO_RALLY_LAND = 190,
1489    #[doc = "Mission command to safely abort an autonomous landing."]
1490    MAV_CMD_DO_GO_AROUND = 191,
1491    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1492    MAV_CMD_DO_REPOSITION = 192,
1493    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1494    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1495    #[doc = "Set moving direction to forward or reverse."]
1496    MAV_CMD_DO_SET_REVERSE = 194,
1497    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1498    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1499    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1500    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1501    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1502    MAV_CMD_DO_SET_ROI_NONE = 197,
1503    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1504    MAV_CMD_DO_SET_ROI_SYSID = 198,
1505    #[doc = "Control onboard camera system."]
1506    MAV_CMD_DO_CONTROL_VIDEO = 200,
1507    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1508    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1509    MAV_CMD_DO_SET_ROI = 201,
1510    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1511    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1512    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1513    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1514    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1515    #[doc = "Mission command to configure a camera or antenna mount"]
1516    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1517    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1518    #[doc = "Mission command to control a camera or antenna mount"]
1519    MAV_CMD_DO_MOUNT_CONTROL = 205,
1520    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1521    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1522    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1523    MAV_CMD_DO_FENCE_ENABLE = 207,
1524    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1525    MAV_CMD_DO_PARACHUTE = 208,
1526    #[doc = "Command to perform motor test."]
1527    MAV_CMD_DO_MOTOR_TEST = 209,
1528    #[doc = "Change to/from inverted flight."]
1529    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1530    #[doc = "Mission command to operate a gripper."]
1531    MAV_CMD_DO_GRIPPER = 211,
1532    #[doc = "Enable/disable autotune."]
1533    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1534    #[doc = "Sets a desired vehicle turn angle and speed change."]
1535    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1536    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1537    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1538    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1539    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1540    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1541    #[doc = "set id of master controller"]
1542    MAV_CMD_DO_GUIDED_MASTER = 221,
1543    #[doc = "Set limits for external control"]
1544    MAV_CMD_DO_GUIDED_LIMITS = 222,
1545    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1546    MAV_CMD_DO_ENGINE_CONTROL = 223,
1547    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1548    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1549    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1550    MAV_CMD_DO_LAST = 240,
1551    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1552    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1553    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1554    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1555    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1556    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1557    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1558    MAV_CMD_PREFLIGHT_STORAGE = 245,
1559    #[doc = "Request the reboot or shutdown of system components."]
1560    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1561    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1562    MAV_CMD_OVERRIDE_GOTO = 252,
1563    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1564    MAV_CMD_OBLIQUE_SURVEY = 260,
1565    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1566    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1567    #[doc = "start running a mission"]
1568    MAV_CMD_MISSION_START = 300,
1569    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1570    MAV_CMD_ACTUATOR_TEST = 310,
1571    #[doc = "Actuator configuration command."]
1572    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1573    #[doc = "Arms / Disarms a component"]
1574    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1575    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1576    MAV_CMD_RUN_PREARM_CHECKS = 401,
1577    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1578    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1579    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1580    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1581    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1582    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1583    MAV_CMD_GET_HOME_POSITION = 410,
1584    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1585    MAV_CMD_INJECT_FAILURE = 420,
1586    #[doc = "Starts receiver pairing."]
1587    MAV_CMD_START_RX_PAIR = 500,
1588    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1589    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1590    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1591    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1592    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1593    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1594    MAV_CMD_REQUEST_MESSAGE = 512,
1595    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1596    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1597    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1598    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1599    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1600    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1601    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1602    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1603    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1604    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1605    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1606    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1607    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1608    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1609    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1610    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1611    MAV_CMD_STORAGE_FORMAT = 526,
1612    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1613    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1614    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1615    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1616    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1617    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1618    #[doc = "Reset all camera settings to Factory Default"]
1619    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1620    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1621    MAV_CMD_SET_CAMERA_MODE = 530,
1622    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1623    MAV_CMD_SET_CAMERA_ZOOM = 531,
1624    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1625    MAV_CMD_SET_CAMERA_FOCUS = 532,
1626    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1627    MAV_CMD_SET_STORAGE_USAGE = 533,
1628    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1629    MAV_CMD_SET_CAMERA_SOURCE = 534,
1630    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1631    MAV_CMD_JUMP_TAG = 600,
1632    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1633    MAV_CMD_DO_JUMP_TAG = 601,
1634    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1635    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1636    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1637    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1638    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1639    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1640    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1641    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1642    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1643    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1644    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1645    #[doc = "Enable or disable on-board camera triggering system."]
1646    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1647    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1648    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1649    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1650    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1651    #[doc = "Stops ongoing tracking."]
1652    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1653    #[doc = "Starts video capture (recording)."]
1654    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1655    #[doc = "Stop the current video capture (recording)."]
1656    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1657    #[doc = "Start video streaming"]
1658    MAV_CMD_VIDEO_START_STREAMING = 2502,
1659    #[doc = "Stop the given video stream"]
1660    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1661    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1662    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1663    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1664    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1665    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1666    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1667    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1668    MAV_CMD_LOGGING_START = 2510,
1669    #[doc = "Request to stop streaming log data over MAVLink"]
1670    MAV_CMD_LOGGING_STOP = 2511,
1671    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1672    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1673    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1674    #[doc = "Create a panorama at the current position"]
1675    MAV_CMD_PANORAMA_CREATE = 2800,
1676    #[doc = "Request VTOL transition"]
1677    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1678    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1679    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1680    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1681    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1682    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1683    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1684    #[doc = "Delay mission state machine until gate has been reached."]
1685    MAV_CMD_CONDITION_GATE = 4501,
1686    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1687    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1688    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1689    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1690    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1691    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1692    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1693    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1694    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1695    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1696    #[doc = "Rally point. You can have multiple rally points defined."]
1697    MAV_CMD_NAV_RALLY_POINT = 5100,
1698    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1699    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1700    #[doc = "Change state of safety switch."]
1701    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1702    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1703    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1704    #[deprecated = "  (Deprecated since 2021-06)"]
1705    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1706    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1707    #[deprecated = "  (Deprecated since 2021-06)"]
1708    #[doc = "Control the payload deployment."]
1709    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1710    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1711    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1712    #[doc = "Command to operate winch."]
1713    MAV_CMD_DO_WINCH = 42600,
1714    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1715    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1716    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1717    MAV_CMD_WAYPOINT_USER_1 = 31000,
1718    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1719    MAV_CMD_WAYPOINT_USER_2 = 31001,
1720    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1721    MAV_CMD_WAYPOINT_USER_3 = 31002,
1722    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1723    MAV_CMD_WAYPOINT_USER_4 = 31003,
1724    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1725    MAV_CMD_WAYPOINT_USER_5 = 31004,
1726    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1727    MAV_CMD_SPATIAL_USER_1 = 31005,
1728    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1729    MAV_CMD_SPATIAL_USER_2 = 31006,
1730    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1731    MAV_CMD_SPATIAL_USER_3 = 31007,
1732    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1733    MAV_CMD_SPATIAL_USER_4 = 31008,
1734    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1735    MAV_CMD_SPATIAL_USER_5 = 31009,
1736    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1737    MAV_CMD_USER_1 = 31010,
1738    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1739    MAV_CMD_USER_2 = 31011,
1740    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1741    MAV_CMD_USER_3 = 31012,
1742    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1743    MAV_CMD_USER_4 = 31013,
1744    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1745    MAV_CMD_USER_5 = 31014,
1746    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1747    MAV_CMD_CAN_FORWARD = 32000,
1748}
1749impl MavCmd {
1750    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1751}
1752impl Default for MavCmd {
1753    fn default() -> Self {
1754        Self::DEFAULT
1755    }
1756}
1757#[cfg_attr(feature = "ts", derive(TS))]
1758#[cfg_attr(feature = "ts", ts(export))]
1759#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1760#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1761#[cfg_attr(feature = "serde", serde(tag = "type"))]
1762#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1763#[repr(u32)]
1764#[doc = "Possible actions an aircraft can take to avoid a collision."]
1765pub enum MavCollisionAction {
1766    #[doc = "Ignore any potential collisions"]
1767    MAV_COLLISION_ACTION_NONE = 0,
1768    #[doc = "Report potential collision"]
1769    MAV_COLLISION_ACTION_REPORT = 1,
1770    #[doc = "Ascend or Descend to avoid threat"]
1771    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1772    #[doc = "Move horizontally to avoid threat"]
1773    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1774    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1775    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1776    #[doc = "Aircraft to fly directly back to its launch point"]
1777    MAV_COLLISION_ACTION_RTL = 5,
1778    #[doc = "Aircraft to stop in place"]
1779    MAV_COLLISION_ACTION_HOVER = 6,
1780}
1781impl MavCollisionAction {
1782    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1783}
1784impl Default for MavCollisionAction {
1785    fn default() -> Self {
1786        Self::DEFAULT
1787    }
1788}
1789#[cfg_attr(feature = "ts", derive(TS))]
1790#[cfg_attr(feature = "ts", ts(export))]
1791#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1792#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1793#[cfg_attr(feature = "serde", serde(tag = "type"))]
1794#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1795#[repr(u32)]
1796#[doc = "Source of information about this collision."]
1797pub enum MavCollisionSrc {
1798    #[doc = "ID field references ADSB_VEHICLE packets"]
1799    MAV_COLLISION_SRC_ADSB = 0,
1800    #[doc = "ID field references MAVLink SRC ID"]
1801    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1802}
1803impl MavCollisionSrc {
1804    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1805}
1806impl Default for MavCollisionSrc {
1807    fn default() -> Self {
1808        Self::DEFAULT
1809    }
1810}
1811#[cfg_attr(feature = "ts", derive(TS))]
1812#[cfg_attr(feature = "ts", ts(export))]
1813#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1814#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1815#[cfg_attr(feature = "serde", serde(tag = "type"))]
1816#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1817#[repr(u32)]
1818#[doc = "Aircraft-rated danger from this threat."]
1819pub enum MavCollisionThreatLevel {
1820    #[doc = "Not a threat"]
1821    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1822    #[doc = "Craft is mildly concerned about this threat"]
1823    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1824    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1825    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1826}
1827impl MavCollisionThreatLevel {
1828    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1829}
1830impl Default for MavCollisionThreatLevel {
1831    fn default() -> Self {
1832        Self::DEFAULT
1833    }
1834}
1835#[cfg_attr(feature = "ts", derive(TS))]
1836#[cfg_attr(feature = "ts", ts(export))]
1837#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1838#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1839#[cfg_attr(feature = "serde", serde(tag = "type"))]
1840#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1841#[repr(u32)]
1842#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1843pub enum MavComponent {
1844    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1845    MAV_COMP_ID_ALL = 0,
1846    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1847    MAV_COMP_ID_AUTOPILOT1 = 1,
1848    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1849    MAV_COMP_ID_USER1 = 25,
1850    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1851    MAV_COMP_ID_USER2 = 26,
1852    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1853    MAV_COMP_ID_USER3 = 27,
1854    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1855    MAV_COMP_ID_USER4 = 28,
1856    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1857    MAV_COMP_ID_USER5 = 29,
1858    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1859    MAV_COMP_ID_USER6 = 30,
1860    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1861    MAV_COMP_ID_USER7 = 31,
1862    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1863    MAV_COMP_ID_USER8 = 32,
1864    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1865    MAV_COMP_ID_USER9 = 33,
1866    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1867    MAV_COMP_ID_USER10 = 34,
1868    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1869    MAV_COMP_ID_USER11 = 35,
1870    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1871    MAV_COMP_ID_USER12 = 36,
1872    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1873    MAV_COMP_ID_USER13 = 37,
1874    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1875    MAV_COMP_ID_USER14 = 38,
1876    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1877    MAV_COMP_ID_USER15 = 39,
1878    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1879    MAV_COMP_ID_USER16 = 40,
1880    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1881    MAV_COMP_ID_USER17 = 41,
1882    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1883    MAV_COMP_ID_USER18 = 42,
1884    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1885    MAV_COMP_ID_USER19 = 43,
1886    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1887    MAV_COMP_ID_USER20 = 44,
1888    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1889    MAV_COMP_ID_USER21 = 45,
1890    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1891    MAV_COMP_ID_USER22 = 46,
1892    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1893    MAV_COMP_ID_USER23 = 47,
1894    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1895    MAV_COMP_ID_USER24 = 48,
1896    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1897    MAV_COMP_ID_USER25 = 49,
1898    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1899    MAV_COMP_ID_USER26 = 50,
1900    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1901    MAV_COMP_ID_USER27 = 51,
1902    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1903    MAV_COMP_ID_USER28 = 52,
1904    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1905    MAV_COMP_ID_USER29 = 53,
1906    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1907    MAV_COMP_ID_USER30 = 54,
1908    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1909    MAV_COMP_ID_USER31 = 55,
1910    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1911    MAV_COMP_ID_USER32 = 56,
1912    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1913    MAV_COMP_ID_USER33 = 57,
1914    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1915    MAV_COMP_ID_USER34 = 58,
1916    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1917    MAV_COMP_ID_USER35 = 59,
1918    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1919    MAV_COMP_ID_USER36 = 60,
1920    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1921    MAV_COMP_ID_USER37 = 61,
1922    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1923    MAV_COMP_ID_USER38 = 62,
1924    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1925    MAV_COMP_ID_USER39 = 63,
1926    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1927    MAV_COMP_ID_USER40 = 64,
1928    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1929    MAV_COMP_ID_USER41 = 65,
1930    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1931    MAV_COMP_ID_USER42 = 66,
1932    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1933    MAV_COMP_ID_USER43 = 67,
1934    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1935    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1936    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1937    MAV_COMP_ID_USER45 = 69,
1938    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1939    MAV_COMP_ID_USER46 = 70,
1940    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1941    MAV_COMP_ID_USER47 = 71,
1942    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1943    MAV_COMP_ID_USER48 = 72,
1944    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1945    MAV_COMP_ID_USER49 = 73,
1946    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1947    MAV_COMP_ID_USER50 = 74,
1948    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1949    MAV_COMP_ID_USER51 = 75,
1950    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1951    MAV_COMP_ID_USER52 = 76,
1952    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1953    MAV_COMP_ID_USER53 = 77,
1954    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1955    MAV_COMP_ID_USER54 = 78,
1956    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1957    MAV_COMP_ID_USER55 = 79,
1958    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1959    MAV_COMP_ID_USER56 = 80,
1960    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1961    MAV_COMP_ID_USER57 = 81,
1962    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1963    MAV_COMP_ID_USER58 = 82,
1964    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1965    MAV_COMP_ID_USER59 = 83,
1966    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1967    MAV_COMP_ID_USER60 = 84,
1968    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1969    MAV_COMP_ID_USER61 = 85,
1970    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1971    MAV_COMP_ID_USER62 = 86,
1972    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1973    MAV_COMP_ID_USER63 = 87,
1974    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1975    MAV_COMP_ID_USER64 = 88,
1976    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1977    MAV_COMP_ID_USER65 = 89,
1978    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1979    MAV_COMP_ID_USER66 = 90,
1980    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1981    MAV_COMP_ID_USER67 = 91,
1982    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1983    MAV_COMP_ID_USER68 = 92,
1984    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1985    MAV_COMP_ID_USER69 = 93,
1986    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1987    MAV_COMP_ID_USER70 = 94,
1988    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1989    MAV_COMP_ID_USER71 = 95,
1990    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1991    MAV_COMP_ID_USER72 = 96,
1992    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1993    MAV_COMP_ID_USER73 = 97,
1994    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1995    MAV_COMP_ID_USER74 = 98,
1996    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1997    MAV_COMP_ID_USER75 = 99,
1998    #[doc = "Camera #1."]
1999    MAV_COMP_ID_CAMERA = 100,
2000    #[doc = "Camera #2."]
2001    MAV_COMP_ID_CAMERA2 = 101,
2002    #[doc = "Camera #3."]
2003    MAV_COMP_ID_CAMERA3 = 102,
2004    #[doc = "Camera #4."]
2005    MAV_COMP_ID_CAMERA4 = 103,
2006    #[doc = "Camera #5."]
2007    MAV_COMP_ID_CAMERA5 = 104,
2008    #[doc = "Camera #6."]
2009    MAV_COMP_ID_CAMERA6 = 105,
2010    #[doc = "Servo #1."]
2011    MAV_COMP_ID_SERVO1 = 140,
2012    #[doc = "Servo #2."]
2013    MAV_COMP_ID_SERVO2 = 141,
2014    #[doc = "Servo #3."]
2015    MAV_COMP_ID_SERVO3 = 142,
2016    #[doc = "Servo #4."]
2017    MAV_COMP_ID_SERVO4 = 143,
2018    #[doc = "Servo #5."]
2019    MAV_COMP_ID_SERVO5 = 144,
2020    #[doc = "Servo #6."]
2021    MAV_COMP_ID_SERVO6 = 145,
2022    #[doc = "Servo #7."]
2023    MAV_COMP_ID_SERVO7 = 146,
2024    #[doc = "Servo #8."]
2025    MAV_COMP_ID_SERVO8 = 147,
2026    #[doc = "Servo #9."]
2027    MAV_COMP_ID_SERVO9 = 148,
2028    #[doc = "Servo #10."]
2029    MAV_COMP_ID_SERVO10 = 149,
2030    #[doc = "Servo #11."]
2031    MAV_COMP_ID_SERVO11 = 150,
2032    #[doc = "Servo #12."]
2033    MAV_COMP_ID_SERVO12 = 151,
2034    #[doc = "Servo #13."]
2035    MAV_COMP_ID_SERVO13 = 152,
2036    #[doc = "Servo #14."]
2037    MAV_COMP_ID_SERVO14 = 153,
2038    #[doc = "Gimbal #1."]
2039    MAV_COMP_ID_GIMBAL = 154,
2040    #[doc = "Logging component."]
2041    MAV_COMP_ID_LOG = 155,
2042    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2043    MAV_COMP_ID_ADSB = 156,
2044    #[doc = "On Screen Display (OSD) devices for video links."]
2045    MAV_COMP_ID_OSD = 157,
2046    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2047    MAV_COMP_ID_PERIPHERAL = 158,
2048    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2049    #[doc = "Gimbal ID for QX1."]
2050    MAV_COMP_ID_QX1_GIMBAL = 159,
2051    #[doc = "FLARM collision alert component."]
2052    MAV_COMP_ID_FLARM = 160,
2053    #[doc = "Parachute component."]
2054    MAV_COMP_ID_PARACHUTE = 161,
2055    #[doc = "Winch component."]
2056    MAV_COMP_ID_WINCH = 169,
2057    #[doc = "Gimbal #2."]
2058    MAV_COMP_ID_GIMBAL2 = 171,
2059    #[doc = "Gimbal #3."]
2060    MAV_COMP_ID_GIMBAL3 = 172,
2061    #[doc = "Gimbal #4"]
2062    MAV_COMP_ID_GIMBAL4 = 173,
2063    #[doc = "Gimbal #5."]
2064    MAV_COMP_ID_GIMBAL5 = 174,
2065    #[doc = "Gimbal #6."]
2066    MAV_COMP_ID_GIMBAL6 = 175,
2067    #[doc = "Battery #1."]
2068    MAV_COMP_ID_BATTERY = 180,
2069    #[doc = "Battery #2."]
2070    MAV_COMP_ID_BATTERY2 = 181,
2071    #[doc = "CAN over MAVLink client."]
2072    MAV_COMP_ID_MAVCAN = 189,
2073    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2074    MAV_COMP_ID_MISSIONPLANNER = 190,
2075    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2076    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2077    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2078    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2079    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2080    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2081    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2082    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2083    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2084    MAV_COMP_ID_PATHPLANNER = 195,
2085    #[doc = "Component that plans a collision free path between two points."]
2086    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2087    #[doc = "Component that provides position estimates using VIO techniques."]
2088    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2089    #[doc = "Component that manages pairing of vehicle and GCS."]
2090    MAV_COMP_ID_PAIRING_MANAGER = 198,
2091    #[doc = "Inertial Measurement Unit (IMU) #1."]
2092    MAV_COMP_ID_IMU = 200,
2093    #[doc = "Inertial Measurement Unit (IMU) #2."]
2094    MAV_COMP_ID_IMU_2 = 201,
2095    #[doc = "Inertial Measurement Unit (IMU) #3."]
2096    MAV_COMP_ID_IMU_3 = 202,
2097    #[doc = "GPS #1."]
2098    MAV_COMP_ID_GPS = 220,
2099    #[doc = "GPS #2."]
2100    MAV_COMP_ID_GPS2 = 221,
2101    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2102    MAV_COMP_ID_ODID_TXRX_1 = 236,
2103    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2104    MAV_COMP_ID_ODID_TXRX_2 = 237,
2105    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2106    MAV_COMP_ID_ODID_TXRX_3 = 238,
2107    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2108    MAV_COMP_ID_UDP_BRIDGE = 240,
2109    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2110    MAV_COMP_ID_UART_BRIDGE = 241,
2111    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2112    MAV_COMP_ID_TUNNEL_NODE = 242,
2113    #[doc = "Illuminator"]
2114    MAV_COMP_ID_ILLUMINATOR = 243,
2115    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2116    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2117    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2118}
2119impl MavComponent {
2120    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2121}
2122impl Default for MavComponent {
2123    fn default() -> Self {
2124        Self::DEFAULT
2125    }
2126}
2127#[cfg_attr(feature = "ts", derive(TS))]
2128#[cfg_attr(feature = "ts", ts(export))]
2129#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2131#[cfg_attr(feature = "serde", serde(tag = "type"))]
2132#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2133#[repr(u32)]
2134#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2135#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2136pub enum MavDataStream {
2137    #[doc = "Enable all data streams"]
2138    MAV_DATA_STREAM_ALL = 0,
2139    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2140    MAV_DATA_STREAM_RAW_SENSORS = 1,
2141    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2142    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2143    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2144    MAV_DATA_STREAM_RC_CHANNELS = 3,
2145    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2146    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2147    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2148    MAV_DATA_STREAM_POSITION = 6,
2149    #[doc = "Dependent on the autopilot"]
2150    MAV_DATA_STREAM_EXTRA1 = 10,
2151    #[doc = "Dependent on the autopilot"]
2152    MAV_DATA_STREAM_EXTRA2 = 11,
2153    #[doc = "Dependent on the autopilot"]
2154    MAV_DATA_STREAM_EXTRA3 = 12,
2155}
2156impl MavDataStream {
2157    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2158}
2159impl Default for MavDataStream {
2160    fn default() -> Self {
2161        Self::DEFAULT
2162    }
2163}
2164#[cfg_attr(feature = "ts", derive(TS))]
2165#[cfg_attr(feature = "ts", ts(export))]
2166#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2168#[cfg_attr(feature = "serde", serde(tag = "type"))]
2169#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2170#[repr(u32)]
2171#[doc = "Enumeration of distance sensor types"]
2172pub enum MavDistanceSensor {
2173    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2174    MAV_DISTANCE_SENSOR_LASER = 0,
2175    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2176    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2177    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2178    MAV_DISTANCE_SENSOR_INFRARED = 2,
2179    #[doc = "Radar type, e.g. uLanding units"]
2180    MAV_DISTANCE_SENSOR_RADAR = 3,
2181    #[doc = "Broken or unknown type, e.g. analog units"]
2182    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2183}
2184impl MavDistanceSensor {
2185    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2186}
2187impl Default for MavDistanceSensor {
2188    fn default() -> Self {
2189        Self::DEFAULT
2190    }
2191}
2192#[cfg_attr(feature = "ts", derive(TS))]
2193#[cfg_attr(feature = "ts", ts(export))]
2194#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2195#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2196#[cfg_attr(feature = "serde", serde(tag = "type"))]
2197#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2198#[repr(u32)]
2199#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2200pub enum MavDoRepositionFlags {
2201    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2202    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2203}
2204impl MavDoRepositionFlags {
2205    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2206}
2207impl Default for MavDoRepositionFlags {
2208    fn default() -> Self {
2209        Self::DEFAULT
2210    }
2211}
2212#[cfg_attr(feature = "ts", derive(TS))]
2213#[cfg_attr(feature = "ts", ts(export))]
2214#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2216#[cfg_attr(feature = "serde", serde(tag = "type"))]
2217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2218#[repr(u32)]
2219#[doc = "Enumeration of estimator types"]
2220pub enum MavEstimatorType {
2221    #[doc = "Unknown type of the estimator."]
2222    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2223    #[doc = "This is a naive estimator without any real covariance feedback."]
2224    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2225    #[doc = "Computer vision based estimate. Might be up to scale."]
2226    MAV_ESTIMATOR_TYPE_VISION = 2,
2227    #[doc = "Visual-inertial estimate."]
2228    MAV_ESTIMATOR_TYPE_VIO = 3,
2229    #[doc = "Plain GPS estimate."]
2230    MAV_ESTIMATOR_TYPE_GPS = 4,
2231    #[doc = "Estimator integrating GPS and inertial sensing."]
2232    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2233    #[doc = "Estimate from external motion capturing system."]
2234    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2235    #[doc = "Estimator based on lidar sensor input."]
2236    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2237    #[doc = "Estimator on autopilot."]
2238    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2239}
2240impl MavEstimatorType {
2241    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2242}
2243impl Default for MavEstimatorType {
2244    fn default() -> Self {
2245        Self::DEFAULT
2246    }
2247}
2248#[cfg_attr(feature = "ts", derive(TS))]
2249#[cfg_attr(feature = "ts", ts(export))]
2250#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2251#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2252#[cfg_attr(feature = "serde", serde(tag = "type"))]
2253#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2254#[repr(u32)]
2255#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2256pub enum MavEventCurrentSequenceFlags {
2257    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2258    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2259}
2260impl MavEventCurrentSequenceFlags {
2261    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2262}
2263impl Default for MavEventCurrentSequenceFlags {
2264    fn default() -> Self {
2265        Self::DEFAULT
2266    }
2267}
2268#[cfg_attr(feature = "ts", derive(TS))]
2269#[cfg_attr(feature = "ts", ts(export))]
2270#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2271#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2272#[cfg_attr(feature = "serde", serde(tag = "type"))]
2273#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2274#[repr(u32)]
2275#[doc = "Reason for an event error response."]
2276pub enum MavEventErrorReason {
2277    #[doc = "The requested event is not available (anymore)."]
2278    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2279}
2280impl MavEventErrorReason {
2281    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2282}
2283impl Default for MavEventErrorReason {
2284    fn default() -> Self {
2285        Self::DEFAULT
2286    }
2287}
2288#[cfg_attr(feature = "ts", derive(TS))]
2289#[cfg_attr(feature = "ts", ts(export))]
2290#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2291#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2292#[cfg_attr(feature = "serde", serde(tag = "type"))]
2293#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2294#[repr(u32)]
2295#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2296pub enum MavFrame {
2297    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2298    MAV_FRAME_GLOBAL = 0,
2299    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2300    MAV_FRAME_LOCAL_NED = 1,
2301    #[doc = "NOT a coordinate frame, indicates a mission command."]
2302    MAV_FRAME_MISSION = 2,
2303    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2304    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2305    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2306    MAV_FRAME_LOCAL_ENU = 4,
2307    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2308    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2309    MAV_FRAME_GLOBAL_INT = 5,
2310    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2311    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2312    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2313    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2314    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2315    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2316    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2317    MAV_FRAME_BODY_NED = 8,
2318    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2319    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2320    MAV_FRAME_BODY_OFFSET_NED = 9,
2321    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2322    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2323    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2324    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2325    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2326    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2327    MAV_FRAME_BODY_FRD = 12,
2328    #[deprecated = "  (Deprecated since 2019-04)"]
2329    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2330    MAV_FRAME_RESERVED_13 = 13,
2331    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2332    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2333    MAV_FRAME_RESERVED_14 = 14,
2334    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2335    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2336    MAV_FRAME_RESERVED_15 = 15,
2337    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2338    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2339    MAV_FRAME_RESERVED_16 = 16,
2340    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2341    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2342    MAV_FRAME_RESERVED_17 = 17,
2343    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2344    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2345    MAV_FRAME_RESERVED_18 = 18,
2346    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2347    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2348    MAV_FRAME_RESERVED_19 = 19,
2349    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2350    MAV_FRAME_LOCAL_FRD = 20,
2351    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2352    MAV_FRAME_LOCAL_FLU = 21,
2353}
2354impl MavFrame {
2355    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2356}
2357impl Default for MavFrame {
2358    fn default() -> Self {
2359        Self::DEFAULT
2360    }
2361}
2362#[cfg_attr(feature = "ts", derive(TS))]
2363#[cfg_attr(feature = "ts", ts(export))]
2364#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2365#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2366#[cfg_attr(feature = "serde", serde(tag = "type"))]
2367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2368#[repr(u32)]
2369#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2370pub enum MavFtpErr {
2371    #[doc = "None: No error"]
2372    MAV_FTP_ERR_NONE = 0,
2373    #[doc = "Fail: Unknown failure"]
2374    MAV_FTP_ERR_FAIL = 1,
2375    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2376    MAV_FTP_ERR_FAILERRNO = 2,
2377    #[doc = "InvalidDataSize: Payload size is invalid"]
2378    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2379    #[doc = "InvalidSession: Session is not currently open"]
2380    MAV_FTP_ERR_INVALIDSESSION = 4,
2381    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2382    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2383    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2384    MAV_FTP_ERR_EOF = 6,
2385    #[doc = "UnknownCommand: Unknown command / opcode"]
2386    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2387    #[doc = "FileExists: File/directory already exists"]
2388    MAV_FTP_ERR_FILEEXISTS = 8,
2389    #[doc = "FileProtected: File/directory is write protected"]
2390    MAV_FTP_ERR_FILEPROTECTED = 9,
2391    #[doc = "FileNotFound: File/directory not found"]
2392    MAV_FTP_ERR_FILENOTFOUND = 10,
2393}
2394impl MavFtpErr {
2395    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2396}
2397impl Default for MavFtpErr {
2398    fn default() -> Self {
2399        Self::DEFAULT
2400    }
2401}
2402#[cfg_attr(feature = "ts", derive(TS))]
2403#[cfg_attr(feature = "ts", ts(export))]
2404#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2405#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2406#[cfg_attr(feature = "serde", serde(tag = "type"))]
2407#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2408#[repr(u32)]
2409#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2410pub enum MavFtpOpcode {
2411    #[doc = "None. Ignored, always ACKed"]
2412    MAV_FTP_OPCODE_NONE = 0,
2413    #[doc = "TerminateSession: Terminates open Read session"]
2414    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2415    #[doc = "ResetSessions: Terminates all open read sessions"]
2416    MAV_FTP_OPCODE_RESETSESSION = 2,
2417    #[doc = "ListDirectory. List files and directories in path from offset"]
2418    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2419    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2420    MAV_FTP_OPCODE_OPENFILERO = 4,
2421    #[doc = "ReadFile: Reads size bytes from offset in session"]
2422    MAV_FTP_OPCODE_READFILE = 5,
2423    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2424    MAV_FTP_OPCODE_CREATEFILE = 6,
2425    #[doc = "WriteFile: Writes size bytes to offset in session"]
2426    MAV_FTP_OPCODE_WRITEFILE = 7,
2427    #[doc = "RemoveFile: Remove file at path"]
2428    MAV_FTP_OPCODE_REMOVEFILE = 8,
2429    #[doc = "CreateDirectory: Creates directory at path"]
2430    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2431    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2432    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2433    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2434    MAV_FTP_OPCODE_OPENFILEWO = 11,
2435    #[doc = "TruncateFile: Truncate file at path to offset length"]
2436    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2437    #[doc = "Rename: Rename path1 to path2"]
2438    MAV_FTP_OPCODE_RENAME = 13,
2439    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2440    MAV_FTP_OPCODE_CALCFILECRC = 14,
2441    #[doc = "BurstReadFile: Burst download session file"]
2442    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2443    #[doc = "ACK: ACK response"]
2444    MAV_FTP_OPCODE_ACK = 128,
2445    #[doc = "NAK: NAK response"]
2446    MAV_FTP_OPCODE_NAK = 129,
2447}
2448impl MavFtpOpcode {
2449    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2450}
2451impl Default for MavFtpOpcode {
2452    fn default() -> Self {
2453        Self::DEFAULT
2454    }
2455}
2456#[cfg_attr(feature = "ts", derive(TS))]
2457#[cfg_attr(feature = "ts", ts(export))]
2458#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2459#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2460#[cfg_attr(feature = "serde", serde(tag = "type"))]
2461#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2462#[repr(u32)]
2463#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2464pub enum MavFuelType {
2465    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2466    MAV_FUEL_TYPE_UNKNOWN = 0,
2467    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2468    MAV_FUEL_TYPE_LIQUID = 1,
2469    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2470    MAV_FUEL_TYPE_GAS = 2,
2471}
2472impl MavFuelType {
2473    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2474}
2475impl Default for MavFuelType {
2476    fn default() -> Self {
2477        Self::DEFAULT
2478    }
2479}
2480bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2481impl MavGeneratorStatusFlag {
2482    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2483}
2484impl Default for MavGeneratorStatusFlag {
2485    fn default() -> Self {
2486        Self::DEFAULT
2487    }
2488}
2489#[cfg_attr(feature = "ts", derive(TS))]
2490#[cfg_attr(feature = "ts", ts(export))]
2491#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2492#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2493#[cfg_attr(feature = "serde", serde(tag = "type"))]
2494#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2495#[repr(u32)]
2496#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2497pub enum MavGoto {
2498    #[doc = "Hold at the current position."]
2499    MAV_GOTO_DO_HOLD = 0,
2500    #[doc = "Continue with the next item in mission execution."]
2501    MAV_GOTO_DO_CONTINUE = 1,
2502    #[doc = "Hold at the current position of the system"]
2503    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2504    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2505    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2506}
2507impl MavGoto {
2508    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2509}
2510impl Default for MavGoto {
2511    fn default() -> Self {
2512        Self::DEFAULT
2513    }
2514}
2515#[cfg_attr(feature = "ts", derive(TS))]
2516#[cfg_attr(feature = "ts", ts(export))]
2517#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2518#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2519#[cfg_attr(feature = "serde", serde(tag = "type"))]
2520#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2521#[repr(u32)]
2522#[doc = "Enumeration of landed detector states"]
2523pub enum MavLandedState {
2524    #[doc = "MAV landed state is unknown"]
2525    MAV_LANDED_STATE_UNDEFINED = 0,
2526    #[doc = "MAV is landed (on ground)"]
2527    MAV_LANDED_STATE_ON_GROUND = 1,
2528    #[doc = "MAV is in air"]
2529    MAV_LANDED_STATE_IN_AIR = 2,
2530    #[doc = "MAV currently taking off"]
2531    MAV_LANDED_STATE_TAKEOFF = 3,
2532    #[doc = "MAV currently landing"]
2533    MAV_LANDED_STATE_LANDING = 4,
2534}
2535impl MavLandedState {
2536    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2537}
2538impl Default for MavLandedState {
2539    fn default() -> Self {
2540        Self::DEFAULT
2541    }
2542}
2543#[cfg_attr(feature = "ts", derive(TS))]
2544#[cfg_attr(feature = "ts", ts(export))]
2545#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2546#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2547#[cfg_attr(feature = "serde", serde(tag = "type"))]
2548#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2549#[repr(u32)]
2550#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2551pub enum MavMissionResult {
2552    #[doc = "mission accepted OK"]
2553    MAV_MISSION_ACCEPTED = 0,
2554    #[doc = "Generic error / not accepting mission commands at all right now."]
2555    MAV_MISSION_ERROR = 1,
2556    #[doc = "Coordinate frame is not supported."]
2557    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2558    #[doc = "Command is not supported."]
2559    MAV_MISSION_UNSUPPORTED = 3,
2560    #[doc = "Mission items exceed storage space."]
2561    MAV_MISSION_NO_SPACE = 4,
2562    #[doc = "One of the parameters has an invalid value."]
2563    MAV_MISSION_INVALID = 5,
2564    #[doc = "param1 has an invalid value."]
2565    MAV_MISSION_INVALID_PARAM1 = 6,
2566    #[doc = "param2 has an invalid value."]
2567    MAV_MISSION_INVALID_PARAM2 = 7,
2568    #[doc = "param3 has an invalid value."]
2569    MAV_MISSION_INVALID_PARAM3 = 8,
2570    #[doc = "param4 has an invalid value."]
2571    MAV_MISSION_INVALID_PARAM4 = 9,
2572    #[doc = "x / param5 has an invalid value."]
2573    MAV_MISSION_INVALID_PARAM5_X = 10,
2574    #[doc = "y / param6 has an invalid value."]
2575    MAV_MISSION_INVALID_PARAM6_Y = 11,
2576    #[doc = "z / param7 has an invalid value."]
2577    MAV_MISSION_INVALID_PARAM7 = 12,
2578    #[doc = "Mission item received out of sequence"]
2579    MAV_MISSION_INVALID_SEQUENCE = 13,
2580    #[doc = "Not accepting any mission commands from this communication partner."]
2581    MAV_MISSION_DENIED = 14,
2582    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2583    MAV_MISSION_OPERATION_CANCELLED = 15,
2584}
2585impl MavMissionResult {
2586    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2587}
2588impl Default for MavMissionResult {
2589    fn default() -> Self {
2590        Self::DEFAULT
2591    }
2592}
2593#[cfg_attr(feature = "ts", derive(TS))]
2594#[cfg_attr(feature = "ts", ts(export))]
2595#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2596#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2597#[cfg_attr(feature = "serde", serde(tag = "type"))]
2598#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2599#[repr(u32)]
2600#[doc = "Type of mission items being requested/sent in mission protocol."]
2601pub enum MavMissionType {
2602    #[doc = "Items are mission commands for main mission."]
2603    MAV_MISSION_TYPE_MISSION = 0,
2604    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2605    MAV_MISSION_TYPE_FENCE = 1,
2606    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2607    MAV_MISSION_TYPE_RALLY = 2,
2608    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2609    MAV_MISSION_TYPE_ALL = 255,
2610}
2611impl MavMissionType {
2612    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2613}
2614impl Default for MavMissionType {
2615    fn default() -> Self {
2616        Self::DEFAULT
2617    }
2618}
2619#[cfg_attr(feature = "ts", derive(TS))]
2620#[cfg_attr(feature = "ts", ts(export))]
2621#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2622#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2623#[cfg_attr(feature = "serde", serde(tag = "type"))]
2624#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2625#[repr(u32)]
2626#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2627pub enum MavMode {
2628    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2629    MAV_MODE_PREFLIGHT = 0,
2630    #[doc = "System is allowed to be active, under assisted RC control."]
2631    MAV_MODE_STABILIZE_DISARMED = 80,
2632    #[doc = "System is allowed to be active, under assisted RC control."]
2633    MAV_MODE_STABILIZE_ARMED = 208,
2634    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2635    MAV_MODE_MANUAL_DISARMED = 64,
2636    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2637    MAV_MODE_MANUAL_ARMED = 192,
2638    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2639    MAV_MODE_GUIDED_DISARMED = 88,
2640    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2641    MAV_MODE_GUIDED_ARMED = 216,
2642    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2643    MAV_MODE_AUTO_DISARMED = 92,
2644    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2645    MAV_MODE_AUTO_ARMED = 220,
2646    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2647    MAV_MODE_TEST_DISARMED = 66,
2648    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2649    MAV_MODE_TEST_ARMED = 194,
2650}
2651impl MavMode {
2652    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2653}
2654impl Default for MavMode {
2655    fn default() -> Self {
2656        Self::DEFAULT
2657    }
2658}
2659bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2660impl MavModeFlag {
2661    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2662}
2663impl Default for MavModeFlag {
2664    fn default() -> Self {
2665        Self::DEFAULT
2666    }
2667}
2668#[cfg_attr(feature = "ts", derive(TS))]
2669#[cfg_attr(feature = "ts", ts(export))]
2670#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2671#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2672#[cfg_attr(feature = "serde", serde(tag = "type"))]
2673#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2674#[repr(u32)]
2675#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2676pub enum MavModeFlagDecodePosition {
2677    #[doc = "First bit:  10000000"]
2678    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2679    #[doc = "Second bit: 01000000"]
2680    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2681    #[doc = "Third bit:  00100000"]
2682    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2683    #[doc = "Fourth bit: 00010000"]
2684    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2685    #[doc = "Fifth bit:  00001000"]
2686    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2687    #[doc = "Sixth bit:   00000100"]
2688    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2689    #[doc = "Seventh bit: 00000010"]
2690    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2691    #[doc = "Eighth bit: 00000001"]
2692    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2693}
2694impl MavModeFlagDecodePosition {
2695    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2696}
2697impl Default for MavModeFlagDecodePosition {
2698    fn default() -> Self {
2699        Self::DEFAULT
2700    }
2701}
2702bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2703impl MavModeProperty {
2704    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2705}
2706impl Default for MavModeProperty {
2707    fn default() -> Self {
2708        Self::DEFAULT
2709    }
2710}
2711#[cfg_attr(feature = "ts", derive(TS))]
2712#[cfg_attr(feature = "ts", ts(export))]
2713#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2714#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2715#[cfg_attr(feature = "serde", serde(tag = "type"))]
2716#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2717#[repr(u32)]
2718#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2719#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2720pub enum MavMountMode {
2721    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2722    MAV_MOUNT_MODE_RETRACT = 0,
2723    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2724    MAV_MOUNT_MODE_NEUTRAL = 1,
2725    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2726    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2727    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2728    MAV_MOUNT_MODE_RC_TARGETING = 3,
2729    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2730    MAV_MOUNT_MODE_GPS_POINT = 4,
2731    #[doc = "Gimbal tracks system with specified system ID"]
2732    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2733    #[doc = "Gimbal tracks home position"]
2734    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2735}
2736impl MavMountMode {
2737    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2738}
2739impl Default for MavMountMode {
2740    fn default() -> Self {
2741        Self::DEFAULT
2742    }
2743}
2744#[cfg_attr(feature = "ts", derive(TS))]
2745#[cfg_attr(feature = "ts", ts(export))]
2746#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2747#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2748#[cfg_attr(feature = "serde", serde(tag = "type"))]
2749#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2750#[repr(u32)]
2751pub enum MavOdidArmStatus {
2752    #[doc = "Passing arming checks."]
2753    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2754    #[doc = "Generic arming failure, see error string for details."]
2755    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2756}
2757impl MavOdidArmStatus {
2758    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2759}
2760impl Default for MavOdidArmStatus {
2761    fn default() -> Self {
2762        Self::DEFAULT
2763    }
2764}
2765#[cfg_attr(feature = "ts", derive(TS))]
2766#[cfg_attr(feature = "ts", ts(export))]
2767#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2768#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2769#[cfg_attr(feature = "serde", serde(tag = "type"))]
2770#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2771#[repr(u32)]
2772pub enum MavOdidAuthType {
2773    #[doc = "No authentication type is specified."]
2774    MAV_ODID_AUTH_TYPE_NONE = 0,
2775    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2776    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2777    #[doc = "Signature for the Operator ID."]
2778    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2779    #[doc = "Signature for the entire message set."]
2780    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2781    #[doc = "Authentication is provided by Network Remote ID."]
2782    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2783    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2784    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2785}
2786impl MavOdidAuthType {
2787    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2788}
2789impl Default for MavOdidAuthType {
2790    fn default() -> Self {
2791        Self::DEFAULT
2792    }
2793}
2794#[cfg_attr(feature = "ts", derive(TS))]
2795#[cfg_attr(feature = "ts", ts(export))]
2796#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2797#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2798#[cfg_attr(feature = "serde", serde(tag = "type"))]
2799#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2800#[repr(u32)]
2801pub enum MavOdidCategoryEu {
2802    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2803    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2804    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2805    MAV_ODID_CATEGORY_EU_OPEN = 1,
2806    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2807    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2808    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2809    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2810}
2811impl MavOdidCategoryEu {
2812    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2813}
2814impl Default for MavOdidCategoryEu {
2815    fn default() -> Self {
2816        Self::DEFAULT
2817    }
2818}
2819#[cfg_attr(feature = "ts", derive(TS))]
2820#[cfg_attr(feature = "ts", ts(export))]
2821#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2822#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2823#[cfg_attr(feature = "serde", serde(tag = "type"))]
2824#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2825#[repr(u32)]
2826pub enum MavOdidClassEu {
2827    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2828    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2829    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2830    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2831    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2832    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2833    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2834    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2835    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2836    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2837    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2838    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2839    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2840    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2841    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2842    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2843}
2844impl MavOdidClassEu {
2845    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2846}
2847impl Default for MavOdidClassEu {
2848    fn default() -> Self {
2849        Self::DEFAULT
2850    }
2851}
2852#[cfg_attr(feature = "ts", derive(TS))]
2853#[cfg_attr(feature = "ts", ts(export))]
2854#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2855#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2856#[cfg_attr(feature = "serde", serde(tag = "type"))]
2857#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2858#[repr(u32)]
2859pub enum MavOdidClassificationType {
2860    #[doc = "The classification type for the UA is undeclared."]
2861    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2862    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2863    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2864}
2865impl MavOdidClassificationType {
2866    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2867}
2868impl Default for MavOdidClassificationType {
2869    fn default() -> Self {
2870        Self::DEFAULT
2871    }
2872}
2873#[cfg_attr(feature = "ts", derive(TS))]
2874#[cfg_attr(feature = "ts", ts(export))]
2875#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2876#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2877#[cfg_attr(feature = "serde", serde(tag = "type"))]
2878#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2879#[repr(u32)]
2880pub enum MavOdidDescType {
2881    #[doc = "Optional free-form text description of the purpose of the flight."]
2882    MAV_ODID_DESC_TYPE_TEXT = 0,
2883    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2884    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2885    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2886    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2887}
2888impl MavOdidDescType {
2889    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2890}
2891impl Default for MavOdidDescType {
2892    fn default() -> Self {
2893        Self::DEFAULT
2894    }
2895}
2896#[cfg_attr(feature = "ts", derive(TS))]
2897#[cfg_attr(feature = "ts", ts(export))]
2898#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2899#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2900#[cfg_attr(feature = "serde", serde(tag = "type"))]
2901#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2902#[repr(u32)]
2903pub enum MavOdidHeightRef {
2904    #[doc = "The height field is relative to the take-off location."]
2905    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2906    #[doc = "The height field is relative to ground."]
2907    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2908}
2909impl MavOdidHeightRef {
2910    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2911}
2912impl Default for MavOdidHeightRef {
2913    fn default() -> Self {
2914        Self::DEFAULT
2915    }
2916}
2917#[cfg_attr(feature = "ts", derive(TS))]
2918#[cfg_attr(feature = "ts", ts(export))]
2919#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2921#[cfg_attr(feature = "serde", serde(tag = "type"))]
2922#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2923#[repr(u32)]
2924pub enum MavOdidHorAcc {
2925    #[doc = "The horizontal accuracy is unknown."]
2926    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2927    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2928    MAV_ODID_HOR_ACC_10NM = 1,
2929    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2930    MAV_ODID_HOR_ACC_4NM = 2,
2931    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2932    MAV_ODID_HOR_ACC_2NM = 3,
2933    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2934    MAV_ODID_HOR_ACC_1NM = 4,
2935    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2936    MAV_ODID_HOR_ACC_0_5NM = 5,
2937    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2938    MAV_ODID_HOR_ACC_0_3NM = 6,
2939    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2940    MAV_ODID_HOR_ACC_0_1NM = 7,
2941    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2942    MAV_ODID_HOR_ACC_0_05NM = 8,
2943    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2944    MAV_ODID_HOR_ACC_30_METER = 9,
2945    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2946    MAV_ODID_HOR_ACC_10_METER = 10,
2947    #[doc = "The horizontal accuracy is smaller than 3 meter."]
2948    MAV_ODID_HOR_ACC_3_METER = 11,
2949    #[doc = "The horizontal accuracy is smaller than 1 meter."]
2950    MAV_ODID_HOR_ACC_1_METER = 12,
2951}
2952impl MavOdidHorAcc {
2953    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
2954}
2955impl Default for MavOdidHorAcc {
2956    fn default() -> Self {
2957        Self::DEFAULT
2958    }
2959}
2960#[cfg_attr(feature = "ts", derive(TS))]
2961#[cfg_attr(feature = "ts", ts(export))]
2962#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2963#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2964#[cfg_attr(feature = "serde", serde(tag = "type"))]
2965#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2966#[repr(u32)]
2967pub enum MavOdidIdType {
2968    #[doc = "No type defined."]
2969    MAV_ODID_ID_TYPE_NONE = 0,
2970    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
2971    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
2972    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
2973    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
2974    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
2975    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
2976    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
2977    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
2978}
2979impl MavOdidIdType {
2980    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
2981}
2982impl Default for MavOdidIdType {
2983    fn default() -> Self {
2984        Self::DEFAULT
2985    }
2986}
2987#[cfg_attr(feature = "ts", derive(TS))]
2988#[cfg_attr(feature = "ts", ts(export))]
2989#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2990#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2991#[cfg_attr(feature = "serde", serde(tag = "type"))]
2992#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2993#[repr(u32)]
2994pub enum MavOdidOperatorIdType {
2995    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
2996    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
2997}
2998impl MavOdidOperatorIdType {
2999    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
3000}
3001impl Default for MavOdidOperatorIdType {
3002    fn default() -> Self {
3003        Self::DEFAULT
3004    }
3005}
3006#[cfg_attr(feature = "ts", derive(TS))]
3007#[cfg_attr(feature = "ts", ts(export))]
3008#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3009#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3010#[cfg_attr(feature = "serde", serde(tag = "type"))]
3011#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3012#[repr(u32)]
3013pub enum MavOdidOperatorLocationType {
3014    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3015    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3016    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3017    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3018    #[doc = "The location/altitude of the operator are fixed values."]
3019    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3020}
3021impl MavOdidOperatorLocationType {
3022    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3023}
3024impl Default for MavOdidOperatorLocationType {
3025    fn default() -> Self {
3026        Self::DEFAULT
3027    }
3028}
3029#[cfg_attr(feature = "ts", derive(TS))]
3030#[cfg_attr(feature = "ts", ts(export))]
3031#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3033#[cfg_attr(feature = "serde", serde(tag = "type"))]
3034#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3035#[repr(u32)]
3036pub enum MavOdidSpeedAcc {
3037    #[doc = "The speed accuracy is unknown."]
3038    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3039    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3040    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3041    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3042    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3043    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3044    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3045    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3046    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3047}
3048impl MavOdidSpeedAcc {
3049    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3050}
3051impl Default for MavOdidSpeedAcc {
3052    fn default() -> Self {
3053        Self::DEFAULT
3054    }
3055}
3056#[cfg_attr(feature = "ts", derive(TS))]
3057#[cfg_attr(feature = "ts", ts(export))]
3058#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3059#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3060#[cfg_attr(feature = "serde", serde(tag = "type"))]
3061#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3062#[repr(u32)]
3063pub enum MavOdidStatus {
3064    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3065    MAV_ODID_STATUS_UNDECLARED = 0,
3066    #[doc = "The UA is on the ground."]
3067    MAV_ODID_STATUS_GROUND = 1,
3068    #[doc = "The UA is in the air."]
3069    MAV_ODID_STATUS_AIRBORNE = 2,
3070    #[doc = "The UA is having an emergency."]
3071    MAV_ODID_STATUS_EMERGENCY = 3,
3072    #[doc = "The remote ID system is failing or unreliable in some way."]
3073    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3074}
3075impl MavOdidStatus {
3076    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3077}
3078impl Default for MavOdidStatus {
3079    fn default() -> Self {
3080        Self::DEFAULT
3081    }
3082}
3083#[cfg_attr(feature = "ts", derive(TS))]
3084#[cfg_attr(feature = "ts", ts(export))]
3085#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3086#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3087#[cfg_attr(feature = "serde", serde(tag = "type"))]
3088#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3089#[repr(u32)]
3090pub enum MavOdidTimeAcc {
3091    #[doc = "The timestamp accuracy is unknown."]
3092    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3093    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3094    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3095    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3096    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3097    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3098    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3099    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3100    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3101    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3102    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3103    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3104    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3105    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3106    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3107    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3108    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3109    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3110    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3111    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3112    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3113    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3114    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3115    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3116    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3117    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3118    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3119    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3120    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3121    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3122    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3123}
3124impl MavOdidTimeAcc {
3125    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3126}
3127impl Default for MavOdidTimeAcc {
3128    fn default() -> Self {
3129        Self::DEFAULT
3130    }
3131}
3132#[cfg_attr(feature = "ts", derive(TS))]
3133#[cfg_attr(feature = "ts", ts(export))]
3134#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3135#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3136#[cfg_attr(feature = "serde", serde(tag = "type"))]
3137#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3138#[repr(u32)]
3139pub enum MavOdidUaType {
3140    #[doc = "No UA (Unmanned Aircraft) type defined."]
3141    MAV_ODID_UA_TYPE_NONE = 0,
3142    #[doc = "Aeroplane/Airplane. Fixed wing."]
3143    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3144    #[doc = "Helicopter or multirotor."]
3145    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3146    #[doc = "Gyroplane."]
3147    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3148    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3149    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3150    #[doc = "Ornithopter."]
3151    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3152    #[doc = "Glider."]
3153    MAV_ODID_UA_TYPE_GLIDER = 6,
3154    #[doc = "Kite."]
3155    MAV_ODID_UA_TYPE_KITE = 7,
3156    #[doc = "Free Balloon."]
3157    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3158    #[doc = "Captive Balloon."]
3159    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3160    #[doc = "Airship. E.g. a blimp."]
3161    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3162    #[doc = "Free Fall/Parachute (unpowered)."]
3163    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3164    #[doc = "Rocket."]
3165    MAV_ODID_UA_TYPE_ROCKET = 12,
3166    #[doc = "Tethered powered aircraft."]
3167    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3168    #[doc = "Ground Obstacle."]
3169    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3170    #[doc = "Other type of aircraft not listed earlier."]
3171    MAV_ODID_UA_TYPE_OTHER = 15,
3172}
3173impl MavOdidUaType {
3174    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3175}
3176impl Default for MavOdidUaType {
3177    fn default() -> Self {
3178        Self::DEFAULT
3179    }
3180}
3181#[cfg_attr(feature = "ts", derive(TS))]
3182#[cfg_attr(feature = "ts", ts(export))]
3183#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3184#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3185#[cfg_attr(feature = "serde", serde(tag = "type"))]
3186#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3187#[repr(u32)]
3188pub enum MavOdidVerAcc {
3189    #[doc = "The vertical accuracy is unknown."]
3190    MAV_ODID_VER_ACC_UNKNOWN = 0,
3191    #[doc = "The vertical accuracy is smaller than 150 meter."]
3192    MAV_ODID_VER_ACC_150_METER = 1,
3193    #[doc = "The vertical accuracy is smaller than 45 meter."]
3194    MAV_ODID_VER_ACC_45_METER = 2,
3195    #[doc = "The vertical accuracy is smaller than 25 meter."]
3196    MAV_ODID_VER_ACC_25_METER = 3,
3197    #[doc = "The vertical accuracy is smaller than 10 meter."]
3198    MAV_ODID_VER_ACC_10_METER = 4,
3199    #[doc = "The vertical accuracy is smaller than 3 meter."]
3200    MAV_ODID_VER_ACC_3_METER = 5,
3201    #[doc = "The vertical accuracy is smaller than 1 meter."]
3202    MAV_ODID_VER_ACC_1_METER = 6,
3203}
3204impl MavOdidVerAcc {
3205    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3206}
3207impl Default for MavOdidVerAcc {
3208    fn default() -> Self {
3209        Self::DEFAULT
3210    }
3211}
3212#[cfg_attr(feature = "ts", derive(TS))]
3213#[cfg_attr(feature = "ts", ts(export))]
3214#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3216#[cfg_attr(feature = "serde", serde(tag = "type"))]
3217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3218#[repr(u32)]
3219#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3220pub enum MavParamExtType {
3221    #[doc = "8-bit unsigned integer"]
3222    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3223    #[doc = "8-bit signed integer"]
3224    MAV_PARAM_EXT_TYPE_INT8 = 2,
3225    #[doc = "16-bit unsigned integer"]
3226    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3227    #[doc = "16-bit signed integer"]
3228    MAV_PARAM_EXT_TYPE_INT16 = 4,
3229    #[doc = "32-bit unsigned integer"]
3230    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3231    #[doc = "32-bit signed integer"]
3232    MAV_PARAM_EXT_TYPE_INT32 = 6,
3233    #[doc = "64-bit unsigned integer"]
3234    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3235    #[doc = "64-bit signed integer"]
3236    MAV_PARAM_EXT_TYPE_INT64 = 8,
3237    #[doc = "32-bit floating-point"]
3238    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3239    #[doc = "64-bit floating-point"]
3240    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3241    #[doc = "Custom Type"]
3242    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3243}
3244impl MavParamExtType {
3245    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3246}
3247impl Default for MavParamExtType {
3248    fn default() -> Self {
3249        Self::DEFAULT
3250    }
3251}
3252#[cfg_attr(feature = "ts", derive(TS))]
3253#[cfg_attr(feature = "ts", ts(export))]
3254#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3256#[cfg_attr(feature = "serde", serde(tag = "type"))]
3257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3258#[repr(u32)]
3259#[doc = "Specifies the datatype of a MAVLink parameter."]
3260pub enum MavParamType {
3261    #[doc = "8-bit unsigned integer"]
3262    MAV_PARAM_TYPE_UINT8 = 1,
3263    #[doc = "8-bit signed integer"]
3264    MAV_PARAM_TYPE_INT8 = 2,
3265    #[doc = "16-bit unsigned integer"]
3266    MAV_PARAM_TYPE_UINT16 = 3,
3267    #[doc = "16-bit signed integer"]
3268    MAV_PARAM_TYPE_INT16 = 4,
3269    #[doc = "32-bit unsigned integer"]
3270    MAV_PARAM_TYPE_UINT32 = 5,
3271    #[doc = "32-bit signed integer"]
3272    MAV_PARAM_TYPE_INT32 = 6,
3273    #[doc = "64-bit unsigned integer"]
3274    MAV_PARAM_TYPE_UINT64 = 7,
3275    #[doc = "64-bit signed integer"]
3276    MAV_PARAM_TYPE_INT64 = 8,
3277    #[doc = "32-bit floating-point"]
3278    MAV_PARAM_TYPE_REAL32 = 9,
3279    #[doc = "64-bit floating-point"]
3280    MAV_PARAM_TYPE_REAL64 = 10,
3281}
3282impl MavParamType {
3283    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3284}
3285impl Default for MavParamType {
3286    fn default() -> Self {
3287        Self::DEFAULT
3288    }
3289}
3290bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3291impl MavPowerStatus {
3292    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3293}
3294impl Default for MavPowerStatus {
3295    fn default() -> Self {
3296        Self::DEFAULT
3297    }
3298}
3299bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3300impl MavProtocolCapability {
3301    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3302}
3303impl Default for MavProtocolCapability {
3304    fn default() -> Self {
3305        Self::DEFAULT
3306    }
3307}
3308#[cfg_attr(feature = "ts", derive(TS))]
3309#[cfg_attr(feature = "ts", ts(export))]
3310#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3312#[cfg_attr(feature = "serde", serde(tag = "type"))]
3313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3314#[repr(u32)]
3315#[doc = "Result from a MAVLink command (MAV_CMD)"]
3316pub enum MavResult {
3317    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3318    MAV_RESULT_ACCEPTED = 0,
3319    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3320    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3321    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3322    MAV_RESULT_DENIED = 2,
3323    #[doc = "Command is not supported (unknown)."]
3324    MAV_RESULT_UNSUPPORTED = 3,
3325    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3326    MAV_RESULT_FAILED = 4,
3327    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3328    MAV_RESULT_IN_PROGRESS = 5,
3329    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3330    MAV_RESULT_CANCELLED = 6,
3331    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3332    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3333    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3334    MAV_RESULT_COMMAND_INT_ONLY = 8,
3335    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3336    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3337}
3338impl MavResult {
3339    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3340}
3341impl Default for MavResult {
3342    fn default() -> Self {
3343        Self::DEFAULT
3344    }
3345}
3346#[cfg_attr(feature = "ts", derive(TS))]
3347#[cfg_attr(feature = "ts", ts(export))]
3348#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3349#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3350#[cfg_attr(feature = "serde", serde(tag = "type"))]
3351#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3352#[repr(u32)]
3353#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3354#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3355pub enum MavRoi {
3356    #[doc = "No region of interest."]
3357    MAV_ROI_NONE = 0,
3358    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3359    MAV_ROI_WPNEXT = 1,
3360    #[doc = "Point toward given waypoint."]
3361    MAV_ROI_WPINDEX = 2,
3362    #[doc = "Point toward fixed location."]
3363    MAV_ROI_LOCATION = 3,
3364    #[doc = "Point toward of given id."]
3365    MAV_ROI_TARGET = 4,
3366}
3367impl MavRoi {
3368    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3369}
3370impl Default for MavRoi {
3371    fn default() -> Self {
3372        Self::DEFAULT
3373    }
3374}
3375#[cfg_attr(feature = "ts", derive(TS))]
3376#[cfg_attr(feature = "ts", ts(export))]
3377#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3378#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3379#[cfg_attr(feature = "serde", serde(tag = "type"))]
3380#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3381#[repr(u32)]
3382#[doc = "Enumeration of sensor orientation, according to its rotations"]
3383pub enum MavSensorOrientation {
3384    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3385    MAV_SENSOR_ROTATION_NONE = 0,
3386    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3387    MAV_SENSOR_ROTATION_YAW_45 = 1,
3388    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3389    MAV_SENSOR_ROTATION_YAW_90 = 2,
3390    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3391    MAV_SENSOR_ROTATION_YAW_135 = 3,
3392    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3393    MAV_SENSOR_ROTATION_YAW_180 = 4,
3394    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3395    MAV_SENSOR_ROTATION_YAW_225 = 5,
3396    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3397    MAV_SENSOR_ROTATION_YAW_270 = 6,
3398    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3399    MAV_SENSOR_ROTATION_YAW_315 = 7,
3400    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3401    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3402    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3403    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3404    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3405    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3406    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3407    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3408    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3409    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3410    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3411    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3412    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3413    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3414    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3415    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3416    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3417    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3418    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3419    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3420    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3421    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3422    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3423    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3424    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3425    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3426    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3427    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3428    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3429    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3430    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3431    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3432    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3433    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3434    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3435    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3436    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3437    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3438    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3439    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3440    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3441    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3442    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3443    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3444    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3445    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3446    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3447    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3448    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3449    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3450    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3451    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3452    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3453    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3454    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3455    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3456    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3457    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3458    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3459    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3460    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3461    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3462    #[doc = "Pitch: 315"]
3463    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3464    #[doc = "Roll: 90, Pitch: 315"]
3465    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3466    #[doc = "Custom orientation"]
3467    MAV_SENSOR_ROTATION_CUSTOM = 100,
3468}
3469impl MavSensorOrientation {
3470    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3471}
3472impl Default for MavSensorOrientation {
3473    fn default() -> Self {
3474        Self::DEFAULT
3475    }
3476}
3477#[cfg_attr(feature = "ts", derive(TS))]
3478#[cfg_attr(feature = "ts", ts(export))]
3479#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3480#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3481#[cfg_attr(feature = "serde", serde(tag = "type"))]
3482#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3483#[repr(u32)]
3484#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3485pub enum MavSeverity {
3486    #[doc = "System is unusable. This is a \"panic\" condition."]
3487    MAV_SEVERITY_EMERGENCY = 0,
3488    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3489    MAV_SEVERITY_ALERT = 1,
3490    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3491    MAV_SEVERITY_CRITICAL = 2,
3492    #[doc = "Indicates an error in secondary/redundant systems."]
3493    MAV_SEVERITY_ERROR = 3,
3494    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3495    MAV_SEVERITY_WARNING = 4,
3496    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3497    MAV_SEVERITY_NOTICE = 5,
3498    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3499    MAV_SEVERITY_INFO = 6,
3500    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3501    MAV_SEVERITY_DEBUG = 7,
3502}
3503impl MavSeverity {
3504    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3505}
3506impl Default for MavSeverity {
3507    fn default() -> Self {
3508        Self::DEFAULT
3509    }
3510}
3511#[cfg_attr(feature = "ts", derive(TS))]
3512#[cfg_attr(feature = "ts", ts(export))]
3513#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3514#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3515#[cfg_attr(feature = "serde", serde(tag = "type"))]
3516#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3517#[repr(u32)]
3518#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3519pub enum MavStandardMode {
3520    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3521    MAV_STANDARD_MODE_NON_STANDARD = 0,
3522    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3523    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3524    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3525    MAV_STANDARD_MODE_ORBIT = 2,
3526    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3527    MAV_STANDARD_MODE_CRUISE = 3,
3528    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3529    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3530    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3531    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3532    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3533    MAV_STANDARD_MODE_MISSION = 6,
3534    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3535    MAV_STANDARD_MODE_LAND = 7,
3536    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3537    MAV_STANDARD_MODE_TAKEOFF = 8,
3538}
3539impl MavStandardMode {
3540    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3541}
3542impl Default for MavStandardMode {
3543    fn default() -> Self {
3544        Self::DEFAULT
3545    }
3546}
3547#[cfg_attr(feature = "ts", derive(TS))]
3548#[cfg_attr(feature = "ts", ts(export))]
3549#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3550#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3551#[cfg_attr(feature = "serde", serde(tag = "type"))]
3552#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3553#[repr(u32)]
3554pub enum MavState {
3555    #[doc = "Uninitialized system, state is unknown."]
3556    MAV_STATE_UNINIT = 0,
3557    #[doc = "System is booting up."]
3558    MAV_STATE_BOOT = 1,
3559    #[doc = "System is calibrating and not flight-ready."]
3560    MAV_STATE_CALIBRATING = 2,
3561    #[doc = "System is grounded and on standby. It can be launched any time."]
3562    MAV_STATE_STANDBY = 3,
3563    #[doc = "System is active and might be already airborne. Motors are engaged."]
3564    MAV_STATE_ACTIVE = 4,
3565    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3566    MAV_STATE_CRITICAL = 5,
3567    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3568    MAV_STATE_EMERGENCY = 6,
3569    #[doc = "System just initialized its power-down sequence, will shut down now."]
3570    MAV_STATE_POWEROFF = 7,
3571    #[doc = "System is terminating itself (failsafe or commanded)."]
3572    MAV_STATE_FLIGHT_TERMINATION = 8,
3573}
3574impl MavState {
3575    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3576}
3577impl Default for MavState {
3578    fn default() -> Self {
3579        Self::DEFAULT
3580    }
3581}
3582bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3583impl MavSysStatusSensor {
3584    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3585}
3586impl Default for MavSysStatusSensor {
3587    fn default() -> Self {
3588        Self::DEFAULT
3589    }
3590}
3591bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3592impl MavSysStatusSensorExtended {
3593    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3594}
3595impl Default for MavSysStatusSensorExtended {
3596    fn default() -> Self {
3597        Self::DEFAULT
3598    }
3599}
3600#[cfg_attr(feature = "ts", derive(TS))]
3601#[cfg_attr(feature = "ts", ts(export))]
3602#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3603#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3604#[cfg_attr(feature = "serde", serde(tag = "type"))]
3605#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3606#[repr(u32)]
3607pub enum MavTunnelPayloadType {
3608    #[doc = "Encoding of payload unknown."]
3609    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3610    #[doc = "Registered for STorM32 gimbal controller."]
3611    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3612    #[doc = "Registered for STorM32 gimbal controller."]
3613    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3614    #[doc = "Registered for STorM32 gimbal controller."]
3615    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3616    #[doc = "Registered for STorM32 gimbal controller."]
3617    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3618    #[doc = "Registered for STorM32 gimbal controller."]
3619    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3620    #[doc = "Registered for STorM32 gimbal controller."]
3621    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3622    #[doc = "Registered for STorM32 gimbal controller."]
3623    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3624    #[doc = "Registered for STorM32 gimbal controller."]
3625    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3626    #[doc = "Registered for STorM32 gimbal controller."]
3627    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3628    #[doc = "Registered for STorM32 gimbal controller."]
3629    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3630    #[doc = "Registered for ModalAI remote OSD protocol."]
3631    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3632    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3633    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3634    #[doc = "Registered for ModalAI vendor use."]
3635    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3636}
3637impl MavTunnelPayloadType {
3638    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3639}
3640impl Default for MavTunnelPayloadType {
3641    fn default() -> Self {
3642        Self::DEFAULT
3643    }
3644}
3645#[cfg_attr(feature = "ts", derive(TS))]
3646#[cfg_attr(feature = "ts", ts(export))]
3647#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3648#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3649#[cfg_attr(feature = "serde", serde(tag = "type"))]
3650#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3651#[repr(u32)]
3652#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3653pub enum MavType {
3654    #[doc = "Generic micro air vehicle"]
3655    MAV_TYPE_GENERIC = 0,
3656    #[doc = "Fixed wing aircraft."]
3657    MAV_TYPE_FIXED_WING = 1,
3658    #[doc = "Quadrotor"]
3659    MAV_TYPE_QUADROTOR = 2,
3660    #[doc = "Coaxial helicopter"]
3661    MAV_TYPE_COAXIAL = 3,
3662    #[doc = "Normal helicopter with tail rotor."]
3663    MAV_TYPE_HELICOPTER = 4,
3664    #[doc = "Ground installation"]
3665    MAV_TYPE_ANTENNA_TRACKER = 5,
3666    #[doc = "Operator control unit / ground control station"]
3667    MAV_TYPE_GCS = 6,
3668    #[doc = "Airship, controlled"]
3669    MAV_TYPE_AIRSHIP = 7,
3670    #[doc = "Free balloon, uncontrolled"]
3671    MAV_TYPE_FREE_BALLOON = 8,
3672    #[doc = "Rocket"]
3673    MAV_TYPE_ROCKET = 9,
3674    #[doc = "Ground rover"]
3675    MAV_TYPE_GROUND_ROVER = 10,
3676    #[doc = "Surface vessel, boat, ship"]
3677    MAV_TYPE_SURFACE_BOAT = 11,
3678    #[doc = "Submarine"]
3679    MAV_TYPE_SUBMARINE = 12,
3680    #[doc = "Hexarotor"]
3681    MAV_TYPE_HEXAROTOR = 13,
3682    #[doc = "Octorotor"]
3683    MAV_TYPE_OCTOROTOR = 14,
3684    #[doc = "Tricopter"]
3685    MAV_TYPE_TRICOPTER = 15,
3686    #[doc = "Flapping wing"]
3687    MAV_TYPE_FLAPPING_WING = 16,
3688    #[doc = "Kite"]
3689    MAV_TYPE_KITE = 17,
3690    #[doc = "Onboard companion controller"]
3691    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3692    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3693    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3694    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3695    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3696    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3697    MAV_TYPE_VTOL_TILTROTOR = 21,
3698    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3699    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3700    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3701    MAV_TYPE_VTOL_TAILSITTER = 23,
3702    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3703    MAV_TYPE_VTOL_TILTWING = 24,
3704    #[doc = "VTOL reserved 5"]
3705    MAV_TYPE_VTOL_RESERVED5 = 25,
3706    #[doc = "Gimbal"]
3707    MAV_TYPE_GIMBAL = 26,
3708    #[doc = "ADSB system"]
3709    MAV_TYPE_ADSB = 27,
3710    #[doc = "Steerable, nonrigid airfoil"]
3711    MAV_TYPE_PARAFOIL = 28,
3712    #[doc = "Dodecarotor"]
3713    MAV_TYPE_DODECAROTOR = 29,
3714    #[doc = "Camera"]
3715    MAV_TYPE_CAMERA = 30,
3716    #[doc = "Charging station"]
3717    MAV_TYPE_CHARGING_STATION = 31,
3718    #[doc = "FLARM collision avoidance system"]
3719    MAV_TYPE_FLARM = 32,
3720    #[doc = "Servo"]
3721    MAV_TYPE_SERVO = 33,
3722    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3723    MAV_TYPE_ODID = 34,
3724    #[doc = "Decarotor"]
3725    MAV_TYPE_DECAROTOR = 35,
3726    #[doc = "Battery"]
3727    MAV_TYPE_BATTERY = 36,
3728    #[doc = "Parachute"]
3729    MAV_TYPE_PARACHUTE = 37,
3730    #[doc = "Log"]
3731    MAV_TYPE_LOG = 38,
3732    #[doc = "OSD"]
3733    MAV_TYPE_OSD = 39,
3734    #[doc = "IMU"]
3735    MAV_TYPE_IMU = 40,
3736    #[doc = "GPS"]
3737    MAV_TYPE_GPS = 41,
3738    #[doc = "Winch"]
3739    MAV_TYPE_WINCH = 42,
3740    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3741    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3742    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3743    MAV_TYPE_ILLUMINATOR = 44,
3744    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3745    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3746}
3747impl MavType {
3748    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3749}
3750impl Default for MavType {
3751    fn default() -> Self {
3752        Self::DEFAULT
3753    }
3754}
3755#[cfg_attr(feature = "ts", derive(TS))]
3756#[cfg_attr(feature = "ts", ts(export))]
3757#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3758#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3759#[cfg_attr(feature = "serde", serde(tag = "type"))]
3760#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3761#[repr(u32)]
3762#[doc = "Enumeration of VTOL states"]
3763pub enum MavVtolState {
3764    #[doc = "MAV is not configured as VTOL"]
3765    MAV_VTOL_STATE_UNDEFINED = 0,
3766    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3767    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3768    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3769    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3770    #[doc = "VTOL is in multicopter state"]
3771    MAV_VTOL_STATE_MC = 3,
3772    #[doc = "VTOL is in fixed-wing state"]
3773    MAV_VTOL_STATE_FW = 4,
3774}
3775impl MavVtolState {
3776    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3777}
3778impl Default for MavVtolState {
3779    fn default() -> Self {
3780        Self::DEFAULT
3781    }
3782}
3783bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3784impl MavWinchStatusFlag {
3785    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3786}
3787impl Default for MavWinchStatusFlag {
3788    fn default() -> Self {
3789        Self::DEFAULT
3790    }
3791}
3792#[cfg_attr(feature = "ts", derive(TS))]
3793#[cfg_attr(feature = "ts", ts(export))]
3794#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3795#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3796#[cfg_attr(feature = "serde", serde(tag = "type"))]
3797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3798#[repr(u32)]
3799pub enum MavlinkDataStreamType {
3800    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3801    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3802    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3803    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3804    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3805    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3806}
3807impl MavlinkDataStreamType {
3808    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3809}
3810impl Default for MavlinkDataStreamType {
3811    fn default() -> Self {
3812        Self::DEFAULT
3813    }
3814}
3815#[cfg_attr(feature = "ts", derive(TS))]
3816#[cfg_attr(feature = "ts", ts(export))]
3817#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3818#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3819#[cfg_attr(feature = "serde", serde(tag = "type"))]
3820#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3821#[repr(u32)]
3822#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3823pub enum MissionState {
3824    #[doc = "The mission status reporting is not supported."]
3825    MISSION_STATE_UNKNOWN = 0,
3826    #[doc = "No mission on the vehicle."]
3827    MISSION_STATE_NO_MISSION = 1,
3828    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3829    MISSION_STATE_NOT_STARTED = 2,
3830    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3831    MISSION_STATE_ACTIVE = 3,
3832    #[doc = "Mission is paused when in auto mode."]
3833    MISSION_STATE_PAUSED = 4,
3834    #[doc = "Mission has executed all mission items."]
3835    MISSION_STATE_COMPLETE = 5,
3836}
3837impl MissionState {
3838    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3839}
3840impl Default for MissionState {
3841    fn default() -> Self {
3842        Self::DEFAULT
3843    }
3844}
3845#[cfg_attr(feature = "ts", derive(TS))]
3846#[cfg_attr(feature = "ts", ts(export))]
3847#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3848#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3849#[cfg_attr(feature = "serde", serde(tag = "type"))]
3850#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3851#[repr(u32)]
3852#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3853pub enum MotorTestOrder {
3854    #[doc = "Default autopilot motor test method."]
3855    MOTOR_TEST_ORDER_DEFAULT = 0,
3856    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3857    MOTOR_TEST_ORDER_SEQUENCE = 1,
3858    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3859    MOTOR_TEST_ORDER_BOARD = 2,
3860}
3861impl MotorTestOrder {
3862    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3863}
3864impl Default for MotorTestOrder {
3865    fn default() -> Self {
3866        Self::DEFAULT
3867    }
3868}
3869#[cfg_attr(feature = "ts", derive(TS))]
3870#[cfg_attr(feature = "ts", ts(export))]
3871#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3873#[cfg_attr(feature = "serde", serde(tag = "type"))]
3874#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3875#[repr(u32)]
3876#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3877pub enum MotorTestThrottleType {
3878    #[doc = "Throttle as a percentage (0 ~ 100)"]
3879    MOTOR_TEST_THROTTLE_PERCENT = 0,
3880    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3881    MOTOR_TEST_THROTTLE_PWM = 1,
3882    #[doc = "Throttle pass-through from pilot's transmitter."]
3883    MOTOR_TEST_THROTTLE_PILOT = 2,
3884    #[doc = "Per-motor compass calibration test."]
3885    MOTOR_TEST_COMPASS_CAL = 3,
3886}
3887impl MotorTestThrottleType {
3888    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3889}
3890impl Default for MotorTestThrottleType {
3891    fn default() -> Self {
3892        Self::DEFAULT
3893    }
3894}
3895#[cfg_attr(feature = "ts", derive(TS))]
3896#[cfg_attr(feature = "ts", ts(export))]
3897#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3898#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3899#[cfg_attr(feature = "serde", serde(tag = "type"))]
3900#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3901#[repr(u32)]
3902pub enum NavVtolLandOptions {
3903    #[doc = "Default autopilot landing behaviour."]
3904    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3905    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3906    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3907    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3908    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3909}
3910impl NavVtolLandOptions {
3911    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3912}
3913impl Default for NavVtolLandOptions {
3914    fn default() -> Self {
3915        Self::DEFAULT
3916    }
3917}
3918#[cfg_attr(feature = "ts", derive(TS))]
3919#[cfg_attr(feature = "ts", ts(export))]
3920#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3921#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3922#[cfg_attr(feature = "serde", serde(tag = "type"))]
3923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3924#[repr(u32)]
3925#[doc = "Yaw behaviour during orbit flight."]
3926pub enum OrbitYawBehaviour {
3927    #[doc = "Vehicle front points to the center (default)."]
3928    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3929    #[doc = "Vehicle front holds heading when message received."]
3930    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3931    #[doc = "Yaw uncontrolled."]
3932    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3933    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3934    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3935    #[doc = "Yaw controlled by RC input."]
3936    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3937    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3938    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3939}
3940impl OrbitYawBehaviour {
3941    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3942}
3943impl Default for OrbitYawBehaviour {
3944    fn default() -> Self {
3945        Self::DEFAULT
3946    }
3947}
3948#[cfg_attr(feature = "ts", derive(TS))]
3949#[cfg_attr(feature = "ts", ts(export))]
3950#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3951#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3952#[cfg_attr(feature = "serde", serde(tag = "type"))]
3953#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3954#[repr(u32)]
3955#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
3956pub enum ParachuteAction {
3957    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
3958    PARACHUTE_DISABLE = 0,
3959    #[doc = "Enable auto-release of parachute."]
3960    PARACHUTE_ENABLE = 1,
3961    #[doc = "Release parachute and kill motors."]
3962    PARACHUTE_RELEASE = 2,
3963}
3964impl ParachuteAction {
3965    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
3966}
3967impl Default for ParachuteAction {
3968    fn default() -> Self {
3969        Self::DEFAULT
3970    }
3971}
3972#[cfg_attr(feature = "ts", derive(TS))]
3973#[cfg_attr(feature = "ts", ts(export))]
3974#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3975#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3976#[cfg_attr(feature = "serde", serde(tag = "type"))]
3977#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3978#[repr(u32)]
3979#[doc = "Result from PARAM_EXT_SET message."]
3980pub enum ParamAck {
3981    #[doc = "Parameter value ACCEPTED and SET"]
3982    PARAM_ACK_ACCEPTED = 0,
3983    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
3984    PARAM_ACK_VALUE_UNSUPPORTED = 1,
3985    #[doc = "Parameter failed to set"]
3986    PARAM_ACK_FAILED = 2,
3987    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
3988    PARAM_ACK_IN_PROGRESS = 3,
3989}
3990impl ParamAck {
3991    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
3992}
3993impl Default for ParamAck {
3994    fn default() -> Self {
3995        Self::DEFAULT
3996    }
3997}
3998bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
3999impl PositionTargetTypemask {
4000    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
4001}
4002impl Default for PositionTargetTypemask {
4003    fn default() -> Self {
4004        Self::DEFAULT
4005    }
4006}
4007#[cfg_attr(feature = "ts", derive(TS))]
4008#[cfg_attr(feature = "ts", ts(export))]
4009#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4010#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4011#[cfg_attr(feature = "serde", serde(tag = "type"))]
4012#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4013#[repr(u32)]
4014#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4015pub enum PrecisionLandMode {
4016    #[doc = "Normal (non-precision) landing."]
4017    PRECISION_LAND_MODE_DISABLED = 0,
4018    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4019    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4020    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4021    PRECISION_LAND_MODE_REQUIRED = 2,
4022}
4023impl PrecisionLandMode {
4024    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4025}
4026impl Default for PrecisionLandMode {
4027    fn default() -> Self {
4028        Self::DEFAULT
4029    }
4030}
4031#[cfg_attr(feature = "ts", derive(TS))]
4032#[cfg_attr(feature = "ts", ts(export))]
4033#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4034#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4035#[cfg_attr(feature = "serde", serde(tag = "type"))]
4036#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4037#[repr(u32)]
4038#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4039pub enum PreflightStorageMissionAction {
4040    #[doc = "Read current mission data from persistent storage"]
4041    MISSION_READ_PERSISTENT = 0,
4042    #[doc = "Write current mission data to persistent storage"]
4043    MISSION_WRITE_PERSISTENT = 1,
4044    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4045    MISSION_RESET_DEFAULT = 2,
4046}
4047impl PreflightStorageMissionAction {
4048    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4049}
4050impl Default for PreflightStorageMissionAction {
4051    fn default() -> Self {
4052        Self::DEFAULT
4053    }
4054}
4055#[cfg_attr(feature = "ts", derive(TS))]
4056#[cfg_attr(feature = "ts", ts(export))]
4057#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4058#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4059#[cfg_attr(feature = "serde", serde(tag = "type"))]
4060#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4061#[repr(u32)]
4062#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4063pub enum PreflightStorageParameterAction {
4064    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4065    PARAM_READ_PERSISTENT = 0,
4066    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4067    PARAM_WRITE_PERSISTENT = 1,
4068    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4069    PARAM_RESET_CONFIG_DEFAULT = 2,
4070    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4071    PARAM_RESET_SENSOR_DEFAULT = 3,
4072    #[doc = "Reset all parameters, including operation counters, to default values"]
4073    PARAM_RESET_ALL_DEFAULT = 4,
4074}
4075impl PreflightStorageParameterAction {
4076    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4077}
4078impl Default for PreflightStorageParameterAction {
4079    fn default() -> Self {
4080        Self::DEFAULT
4081    }
4082}
4083#[cfg_attr(feature = "ts", derive(TS))]
4084#[cfg_attr(feature = "ts", ts(export))]
4085#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4086#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4087#[cfg_attr(feature = "serde", serde(tag = "type"))]
4088#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4089#[repr(u32)]
4090#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4091pub enum RcSubType {
4092    #[doc = "Spektrum DSM2"]
4093    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4094    #[doc = "Spektrum DSMX"]
4095    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4096    #[doc = "Spektrum DSMX8"]
4097    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4098}
4099impl RcSubType {
4100    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4101}
4102impl Default for RcSubType {
4103    fn default() -> Self {
4104        Self::DEFAULT
4105    }
4106}
4107#[cfg_attr(feature = "ts", derive(TS))]
4108#[cfg_attr(feature = "ts", ts(export))]
4109#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4110#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4111#[cfg_attr(feature = "serde", serde(tag = "type"))]
4112#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4113#[repr(u32)]
4114#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4115pub enum RcType {
4116    #[doc = "Spektrum"]
4117    RC_TYPE_SPEKTRUM = 0,
4118    #[doc = "CRSF"]
4119    RC_TYPE_CRSF = 1,
4120}
4121impl RcType {
4122    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4123}
4124impl Default for RcType {
4125    fn default() -> Self {
4126        Self::DEFAULT
4127    }
4128}
4129#[cfg_attr(feature = "ts", derive(TS))]
4130#[cfg_attr(feature = "ts", ts(export))]
4131#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4132#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4133#[cfg_attr(feature = "serde", serde(tag = "type"))]
4134#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4135#[repr(u32)]
4136#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4137pub enum RebootShutdownConditions {
4138    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4139    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4140    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4141    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4142}
4143impl RebootShutdownConditions {
4144    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4145}
4146impl Default for RebootShutdownConditions {
4147    fn default() -> Self {
4148        Self::DEFAULT
4149    }
4150}
4151#[cfg_attr(feature = "ts", derive(TS))]
4152#[cfg_attr(feature = "ts", ts(export))]
4153#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4155#[cfg_attr(feature = "serde", serde(tag = "type"))]
4156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4157#[repr(u32)]
4158#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4159pub enum RtkBaselineCoordinateSystem {
4160    #[doc = "Earth-centered, Earth-fixed"]
4161    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4162    #[doc = "RTK basestation centered, north, east, down"]
4163    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4164}
4165impl RtkBaselineCoordinateSystem {
4166    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4167}
4168impl Default for RtkBaselineCoordinateSystem {
4169    fn default() -> Self {
4170        Self::DEFAULT
4171    }
4172}
4173#[cfg_attr(feature = "ts", derive(TS))]
4174#[cfg_attr(feature = "ts", ts(export))]
4175#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4176#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4177#[cfg_attr(feature = "serde", serde(tag = "type"))]
4178#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4179#[repr(u32)]
4180#[doc = "Possible safety switch states."]
4181pub enum SafetySwitchState {
4182    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4183    SAFETY_SWITCH_STATE_SAFE = 0,
4184    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4185    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4186}
4187impl SafetySwitchState {
4188    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4189}
4190impl Default for SafetySwitchState {
4191    fn default() -> Self {
4192        Self::DEFAULT
4193    }
4194}
4195#[cfg_attr(feature = "ts", derive(TS))]
4196#[cfg_attr(feature = "ts", ts(export))]
4197#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4198#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4199#[cfg_attr(feature = "serde", serde(tag = "type"))]
4200#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4201#[repr(u32)]
4202#[doc = "SERIAL_CONTROL device types"]
4203pub enum SerialControlDev {
4204    #[doc = "First telemetry port"]
4205    SERIAL_CONTROL_DEV_TELEM1 = 0,
4206    #[doc = "Second telemetry port"]
4207    SERIAL_CONTROL_DEV_TELEM2 = 1,
4208    #[doc = "First GPS port"]
4209    SERIAL_CONTROL_DEV_GPS1 = 2,
4210    #[doc = "Second GPS port"]
4211    SERIAL_CONTROL_DEV_GPS2 = 3,
4212    #[doc = "system shell"]
4213    SERIAL_CONTROL_DEV_SHELL = 10,
4214    #[doc = "SERIAL0"]
4215    SERIAL_CONTROL_SERIAL0 = 100,
4216    #[doc = "SERIAL1"]
4217    SERIAL_CONTROL_SERIAL1 = 101,
4218    #[doc = "SERIAL2"]
4219    SERIAL_CONTROL_SERIAL2 = 102,
4220    #[doc = "SERIAL3"]
4221    SERIAL_CONTROL_SERIAL3 = 103,
4222    #[doc = "SERIAL4"]
4223    SERIAL_CONTROL_SERIAL4 = 104,
4224    #[doc = "SERIAL5"]
4225    SERIAL_CONTROL_SERIAL5 = 105,
4226    #[doc = "SERIAL6"]
4227    SERIAL_CONTROL_SERIAL6 = 106,
4228    #[doc = "SERIAL7"]
4229    SERIAL_CONTROL_SERIAL7 = 107,
4230    #[doc = "SERIAL8"]
4231    SERIAL_CONTROL_SERIAL8 = 108,
4232    #[doc = "SERIAL9"]
4233    SERIAL_CONTROL_SERIAL9 = 109,
4234}
4235impl SerialControlDev {
4236    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4237}
4238impl Default for SerialControlDev {
4239    fn default() -> Self {
4240        Self::DEFAULT
4241    }
4242}
4243bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4244impl SerialControlFlag {
4245    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4246}
4247impl Default for SerialControlFlag {
4248    fn default() -> Self {
4249        Self::DEFAULT
4250    }
4251}
4252#[cfg_attr(feature = "ts", derive(TS))]
4253#[cfg_attr(feature = "ts", ts(export))]
4254#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4256#[cfg_attr(feature = "serde", serde(tag = "type"))]
4257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4258#[repr(u32)]
4259#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4260pub enum SetFocusType {
4261    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4262    FOCUS_TYPE_STEP = 0,
4263    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4264    FOCUS_TYPE_CONTINUOUS = 1,
4265    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4266    FOCUS_TYPE_RANGE = 2,
4267    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4268    FOCUS_TYPE_METERS = 3,
4269    #[doc = "Focus automatically."]
4270    FOCUS_TYPE_AUTO = 4,
4271    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4272    FOCUS_TYPE_AUTO_SINGLE = 5,
4273    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4274    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4275}
4276impl SetFocusType {
4277    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4278}
4279impl Default for SetFocusType {
4280    fn default() -> Self {
4281        Self::DEFAULT
4282    }
4283}
4284#[cfg_attr(feature = "ts", derive(TS))]
4285#[cfg_attr(feature = "ts", ts(export))]
4286#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4287#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4288#[cfg_attr(feature = "serde", serde(tag = "type"))]
4289#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4290#[repr(u32)]
4291#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4292pub enum SpeedType {
4293    #[doc = "Airspeed"]
4294    SPEED_TYPE_AIRSPEED = 0,
4295    #[doc = "Groundspeed"]
4296    SPEED_TYPE_GROUNDSPEED = 1,
4297    #[doc = "Climb speed"]
4298    SPEED_TYPE_CLIMB_SPEED = 2,
4299    #[doc = "Descent speed"]
4300    SPEED_TYPE_DESCENT_SPEED = 3,
4301}
4302impl SpeedType {
4303    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4304}
4305impl Default for SpeedType {
4306    fn default() -> Self {
4307        Self::DEFAULT
4308    }
4309}
4310#[cfg_attr(feature = "ts", derive(TS))]
4311#[cfg_attr(feature = "ts", ts(export))]
4312#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4313#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4314#[cfg_attr(feature = "serde", serde(tag = "type"))]
4315#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4316#[repr(u32)]
4317#[doc = "Flags to indicate the status of camera storage."]
4318pub enum StorageStatus {
4319    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4320    STORAGE_STATUS_EMPTY = 0,
4321    #[doc = "Storage present but unformatted."]
4322    STORAGE_STATUS_UNFORMATTED = 1,
4323    #[doc = "Storage present and ready."]
4324    STORAGE_STATUS_READY = 2,
4325    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4326    STORAGE_STATUS_NOT_SUPPORTED = 3,
4327}
4328impl StorageStatus {
4329    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4330}
4331impl Default for StorageStatus {
4332    fn default() -> Self {
4333        Self::DEFAULT
4334    }
4335}
4336#[cfg_attr(feature = "ts", derive(TS))]
4337#[cfg_attr(feature = "ts", ts(export))]
4338#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4340#[cfg_attr(feature = "serde", serde(tag = "type"))]
4341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4342#[repr(u32)]
4343#[doc = "Flags to indicate the type of storage."]
4344pub enum StorageType {
4345    #[doc = "Storage type is not known."]
4346    STORAGE_TYPE_UNKNOWN = 0,
4347    #[doc = "Storage type is USB device."]
4348    STORAGE_TYPE_USB_STICK = 1,
4349    #[doc = "Storage type is SD card."]
4350    STORAGE_TYPE_SD = 2,
4351    #[doc = "Storage type is microSD card."]
4352    STORAGE_TYPE_MICROSD = 3,
4353    #[doc = "Storage type is CFast."]
4354    STORAGE_TYPE_CF = 4,
4355    #[doc = "Storage type is CFexpress."]
4356    STORAGE_TYPE_CFE = 5,
4357    #[doc = "Storage type is XQD."]
4358    STORAGE_TYPE_XQD = 6,
4359    #[doc = "Storage type is HD mass storage type."]
4360    STORAGE_TYPE_HD = 7,
4361    #[doc = "Storage type is other, not listed type."]
4362    STORAGE_TYPE_OTHER = 254,
4363}
4364impl StorageType {
4365    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4366}
4367impl Default for StorageType {
4368    fn default() -> Self {
4369        Self::DEFAULT
4370    }
4371}
4372bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4373impl StorageUsageFlag {
4374    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4375}
4376impl Default for StorageUsageFlag {
4377    fn default() -> Self {
4378        Self::DEFAULT
4379    }
4380}
4381#[cfg_attr(feature = "ts", derive(TS))]
4382#[cfg_attr(feature = "ts", ts(export))]
4383#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4384#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4385#[cfg_attr(feature = "serde", serde(tag = "type"))]
4386#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4387#[repr(u32)]
4388#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4389pub enum TuneFormat {
4390    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4391    TUNE_FORMAT_QBASIC1_1 = 1,
4392    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4393    TUNE_FORMAT_MML_MODERN = 2,
4394}
4395impl TuneFormat {
4396    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4397}
4398impl Default for TuneFormat {
4399    fn default() -> Self {
4400        Self::DEFAULT
4401    }
4402}
4403#[cfg_attr(feature = "ts", derive(TS))]
4404#[cfg_attr(feature = "ts", ts(export))]
4405#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4406#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4407#[cfg_attr(feature = "serde", serde(tag = "type"))]
4408#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4409#[repr(u32)]
4410#[doc = "Generalized UAVCAN node health"]
4411pub enum UavcanNodeHealth {
4412    #[doc = "The node is functioning properly."]
4413    UAVCAN_NODE_HEALTH_OK = 0,
4414    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4415    UAVCAN_NODE_HEALTH_WARNING = 1,
4416    #[doc = "The node has encountered a major failure."]
4417    UAVCAN_NODE_HEALTH_ERROR = 2,
4418    #[doc = "The node has suffered a fatal malfunction."]
4419    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4420}
4421impl UavcanNodeHealth {
4422    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4423}
4424impl Default for UavcanNodeHealth {
4425    fn default() -> Self {
4426        Self::DEFAULT
4427    }
4428}
4429#[cfg_attr(feature = "ts", derive(TS))]
4430#[cfg_attr(feature = "ts", ts(export))]
4431#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4432#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4433#[cfg_attr(feature = "serde", serde(tag = "type"))]
4434#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4435#[repr(u32)]
4436#[doc = "Generalized UAVCAN node mode"]
4437pub enum UavcanNodeMode {
4438    #[doc = "The node is performing its primary functions."]
4439    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4440    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4441    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4442    #[doc = "The node is under maintenance."]
4443    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4444    #[doc = "The node is in the process of updating its software."]
4445    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4446    #[doc = "The node is no longer available online."]
4447    UAVCAN_NODE_MODE_OFFLINE = 7,
4448}
4449impl UavcanNodeMode {
4450    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4451}
4452impl Default for UavcanNodeMode {
4453    fn default() -> Self {
4454        Self::DEFAULT
4455    }
4456}
4457bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4458impl UtmDataAvailFlags {
4459    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4460}
4461impl Default for UtmDataAvailFlags {
4462    fn default() -> Self {
4463        Self::DEFAULT
4464    }
4465}
4466#[cfg_attr(feature = "ts", derive(TS))]
4467#[cfg_attr(feature = "ts", ts(export))]
4468#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4469#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4470#[cfg_attr(feature = "serde", serde(tag = "type"))]
4471#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4472#[repr(u32)]
4473#[doc = "Airborne status of UAS."]
4474pub enum UtmFlightState {
4475    #[doc = "The flight state can't be determined."]
4476    UTM_FLIGHT_STATE_UNKNOWN = 1,
4477    #[doc = "UAS on ground."]
4478    UTM_FLIGHT_STATE_GROUND = 2,
4479    #[doc = "UAS airborne."]
4480    UTM_FLIGHT_STATE_AIRBORNE = 3,
4481    #[doc = "UAS is in an emergency flight state."]
4482    UTM_FLIGHT_STATE_EMERGENCY = 16,
4483    #[doc = "UAS has no active controls."]
4484    UTM_FLIGHT_STATE_NOCTRL = 32,
4485}
4486impl UtmFlightState {
4487    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4488}
4489impl Default for UtmFlightState {
4490    fn default() -> Self {
4491        Self::DEFAULT
4492    }
4493}
4494#[cfg_attr(feature = "ts", derive(TS))]
4495#[cfg_attr(feature = "ts", ts(export))]
4496#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4498#[cfg_attr(feature = "serde", serde(tag = "type"))]
4499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4500#[repr(u32)]
4501#[doc = "Video stream encodings"]
4502pub enum VideoStreamEncoding {
4503    #[doc = "Stream encoding is unknown"]
4504    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4505    #[doc = "Stream encoding is H.264"]
4506    VIDEO_STREAM_ENCODING_H264 = 1,
4507    #[doc = "Stream encoding is H.265"]
4508    VIDEO_STREAM_ENCODING_H265 = 2,
4509}
4510impl VideoStreamEncoding {
4511    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4512}
4513impl Default for VideoStreamEncoding {
4514    fn default() -> Self {
4515        Self::DEFAULT
4516    }
4517}
4518bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4519impl VideoStreamStatusFlags {
4520    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4521}
4522impl Default for VideoStreamStatusFlags {
4523    fn default() -> Self {
4524        Self::DEFAULT
4525    }
4526}
4527#[cfg_attr(feature = "ts", derive(TS))]
4528#[cfg_attr(feature = "ts", ts(export))]
4529#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4531#[cfg_attr(feature = "serde", serde(tag = "type"))]
4532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4533#[repr(u32)]
4534#[doc = "Video stream types"]
4535pub enum VideoStreamType {
4536    #[doc = "Stream is RTSP"]
4537    VIDEO_STREAM_TYPE_RTSP = 0,
4538    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4539    VIDEO_STREAM_TYPE_RTPUDP = 1,
4540    #[doc = "Stream is MPEG on TCP"]
4541    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4542    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4543    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4544}
4545impl VideoStreamType {
4546    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4547}
4548impl Default for VideoStreamType {
4549    fn default() -> Self {
4550        Self::DEFAULT
4551    }
4552}
4553#[cfg_attr(feature = "ts", derive(TS))]
4554#[cfg_attr(feature = "ts", ts(export))]
4555#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4556#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4557#[cfg_attr(feature = "serde", serde(tag = "type"))]
4558#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4559#[repr(u32)]
4560#[doc = "Direction of VTOL transition"]
4561pub enum VtolTransitionHeading {
4562    #[doc = "Respect the heading configuration of the vehicle."]
4563    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4564    #[doc = "Use the heading pointing towards the next waypoint."]
4565    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4566    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4567    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4568    #[doc = "Use the specified heading in parameter 4."]
4569    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4570    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4571    VTOL_TRANSITION_HEADING_ANY = 4,
4572}
4573impl VtolTransitionHeading {
4574    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4575}
4576impl Default for VtolTransitionHeading {
4577    fn default() -> Self {
4578        Self::DEFAULT
4579    }
4580}
4581#[cfg_attr(feature = "ts", derive(TS))]
4582#[cfg_attr(feature = "ts", ts(export))]
4583#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4584#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4585#[cfg_attr(feature = "serde", serde(tag = "type"))]
4586#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4587#[repr(u32)]
4588#[doc = "WiFi Mode."]
4589pub enum WifiConfigApMode {
4590    #[doc = "WiFi mode is undefined."]
4591    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4592    #[doc = "WiFi configured as an access point."]
4593    WIFI_CONFIG_AP_MODE_AP = 1,
4594    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4595    WIFI_CONFIG_AP_MODE_STATION = 2,
4596    #[doc = "WiFi disabled."]
4597    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4598}
4599impl WifiConfigApMode {
4600    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4601}
4602impl Default for WifiConfigApMode {
4603    fn default() -> Self {
4604        Self::DEFAULT
4605    }
4606}
4607#[cfg_attr(feature = "ts", derive(TS))]
4608#[cfg_attr(feature = "ts", ts(export))]
4609#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4610#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4611#[cfg_attr(feature = "serde", serde(tag = "type"))]
4612#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4613#[repr(u32)]
4614#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4615pub enum WifiConfigApResponse {
4616    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4617    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4618    #[doc = "Changes accepted."]
4619    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4620    #[doc = "Changes rejected."]
4621    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4622    #[doc = "Invalid Mode."]
4623    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4624    #[doc = "Invalid SSID."]
4625    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4626    #[doc = "Invalid Password."]
4627    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4628}
4629impl WifiConfigApResponse {
4630    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4631}
4632impl Default for WifiConfigApResponse {
4633    fn default() -> Self {
4634        Self::DEFAULT
4635    }
4636}
4637#[cfg_attr(feature = "ts", derive(TS))]
4638#[cfg_attr(feature = "ts", ts(export))]
4639#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4640#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4641#[cfg_attr(feature = "serde", serde(tag = "type"))]
4642#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4643#[repr(u32)]
4644#[doc = "Winch actions."]
4645pub enum WinchActions {
4646    #[doc = "Allow motor to freewheel."]
4647    WINCH_RELAXED = 0,
4648    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4649    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4650    #[doc = "Wind or unwind line at specified rate."]
4651    WINCH_RATE_CONTROL = 2,
4652    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4653    WINCH_LOCK = 3,
4654    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4655    WINCH_DELIVER = 4,
4656    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4657    WINCH_HOLD = 5,
4658    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4659    WINCH_RETRACT = 6,
4660    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4661    WINCH_LOAD_LINE = 7,
4662    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4663    WINCH_ABANDON_LINE = 8,
4664    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4665    WINCH_LOAD_PAYLOAD = 9,
4666}
4667impl WinchActions {
4668    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4669}
4670impl Default for WinchActions {
4671    fn default() -> Self {
4672        Self::DEFAULT
4673    }
4674}
4675#[doc = "Set the vehicle attitude and body angular rates."]
4676#[doc = ""]
4677#[doc = "ID: 140"]
4678#[derive(Debug, Clone, PartialEq)]
4679#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4680#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4681#[cfg_attr(feature = "ts", derive(TS))]
4682#[cfg_attr(feature = "ts", ts(export))]
4683pub struct ACTUATOR_CONTROL_TARGET_DATA {
4684    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4685    pub time_usec: u64,
4686    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4687    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4688    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4689    pub controls: [f32; 8],
4690    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4691    pub group_mlx: u8,
4692}
4693impl ACTUATOR_CONTROL_TARGET_DATA {
4694    pub const ENCODED_LEN: usize = 41usize;
4695    pub const DEFAULT: Self = Self {
4696        time_usec: 0_u64,
4697        controls: [0.0_f32; 8usize],
4698        group_mlx: 0_u8,
4699    };
4700    #[cfg(feature = "arbitrary")]
4701    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4702        use arbitrary::{Arbitrary, Unstructured};
4703        let mut buf = [0u8; 1024];
4704        rng.fill_bytes(&mut buf);
4705        let mut unstructured = Unstructured::new(&buf);
4706        Self::arbitrary(&mut unstructured).unwrap_or_default()
4707    }
4708}
4709impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4710    fn default() -> Self {
4711        Self::DEFAULT.clone()
4712    }
4713}
4714impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4715    type Message = MavMessage;
4716    const ID: u32 = 140u32;
4717    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4718    const EXTRA_CRC: u8 = 181u8;
4719    const ENCODED_LEN: usize = 41usize;
4720    fn deser(
4721        _version: MavlinkVersion,
4722        __input: &[u8],
4723    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4724        let avail_len = __input.len();
4725        let mut payload_buf = [0; Self::ENCODED_LEN];
4726        let mut buf = if avail_len < Self::ENCODED_LEN {
4727            payload_buf[0..avail_len].copy_from_slice(__input);
4728            Bytes::new(&payload_buf)
4729        } else {
4730            Bytes::new(__input)
4731        };
4732        let mut __struct = Self::default();
4733        __struct.time_usec = buf.get_u64_le();
4734        for v in &mut __struct.controls {
4735            let val = buf.get_f32_le();
4736            *v = val;
4737        }
4738        __struct.group_mlx = buf.get_u8();
4739        Ok(__struct)
4740    }
4741    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4742        let mut __tmp = BytesMut::new(bytes);
4743        #[allow(clippy::absurd_extreme_comparisons)]
4744        #[allow(unused_comparisons)]
4745        if __tmp.remaining() < Self::ENCODED_LEN {
4746            panic!(
4747                "buffer is too small (need {} bytes, but got {})",
4748                Self::ENCODED_LEN,
4749                __tmp.remaining(),
4750            )
4751        }
4752        __tmp.put_u64_le(self.time_usec);
4753        for val in &self.controls {
4754            __tmp.put_f32_le(*val);
4755        }
4756        __tmp.put_u8(self.group_mlx);
4757        if matches!(version, MavlinkVersion::V2) {
4758            let len = __tmp.len();
4759            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4760        } else {
4761            __tmp.len()
4762        }
4763    }
4764}
4765#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4766#[doc = ""]
4767#[doc = "ID: 375"]
4768#[derive(Debug, Clone, PartialEq)]
4769#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4770#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4771#[cfg_attr(feature = "ts", derive(TS))]
4772#[cfg_attr(feature = "ts", ts(export))]
4773pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4774    #[doc = "Timestamp (since system boot)."]
4775    pub time_usec: u64,
4776    #[doc = "Active outputs"]
4777    pub active: u32,
4778    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4779    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4780    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4781    pub actuator: [f32; 32],
4782}
4783impl ACTUATOR_OUTPUT_STATUS_DATA {
4784    pub const ENCODED_LEN: usize = 140usize;
4785    pub const DEFAULT: Self = Self {
4786        time_usec: 0_u64,
4787        active: 0_u32,
4788        actuator: [0.0_f32; 32usize],
4789    };
4790    #[cfg(feature = "arbitrary")]
4791    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4792        use arbitrary::{Arbitrary, Unstructured};
4793        let mut buf = [0u8; 1024];
4794        rng.fill_bytes(&mut buf);
4795        let mut unstructured = Unstructured::new(&buf);
4796        Self::arbitrary(&mut unstructured).unwrap_or_default()
4797    }
4798}
4799impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4800    fn default() -> Self {
4801        Self::DEFAULT.clone()
4802    }
4803}
4804impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4805    type Message = MavMessage;
4806    const ID: u32 = 375u32;
4807    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4808    const EXTRA_CRC: u8 = 251u8;
4809    const ENCODED_LEN: usize = 140usize;
4810    fn deser(
4811        _version: MavlinkVersion,
4812        __input: &[u8],
4813    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4814        let avail_len = __input.len();
4815        let mut payload_buf = [0; Self::ENCODED_LEN];
4816        let mut buf = if avail_len < Self::ENCODED_LEN {
4817            payload_buf[0..avail_len].copy_from_slice(__input);
4818            Bytes::new(&payload_buf)
4819        } else {
4820            Bytes::new(__input)
4821        };
4822        let mut __struct = Self::default();
4823        __struct.time_usec = buf.get_u64_le();
4824        __struct.active = buf.get_u32_le();
4825        for v in &mut __struct.actuator {
4826            let val = buf.get_f32_le();
4827            *v = val;
4828        }
4829        Ok(__struct)
4830    }
4831    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4832        let mut __tmp = BytesMut::new(bytes);
4833        #[allow(clippy::absurd_extreme_comparisons)]
4834        #[allow(unused_comparisons)]
4835        if __tmp.remaining() < Self::ENCODED_LEN {
4836            panic!(
4837                "buffer is too small (need {} bytes, but got {})",
4838                Self::ENCODED_LEN,
4839                __tmp.remaining(),
4840            )
4841        }
4842        __tmp.put_u64_le(self.time_usec);
4843        __tmp.put_u32_le(self.active);
4844        for val in &self.actuator {
4845            __tmp.put_f32_le(*val);
4846        }
4847        if matches!(version, MavlinkVersion::V2) {
4848            let len = __tmp.len();
4849            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4850        } else {
4851            __tmp.len()
4852        }
4853    }
4854}
4855#[doc = "The location and information of an ADSB vehicle."]
4856#[doc = ""]
4857#[doc = "ID: 246"]
4858#[derive(Debug, Clone, PartialEq)]
4859#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4860#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4861#[cfg_attr(feature = "ts", derive(TS))]
4862#[cfg_attr(feature = "ts", ts(export))]
4863pub struct ADSB_VEHICLE_DATA {
4864    #[doc = "ICAO address"]
4865    pub ICAO_address: u32,
4866    #[doc = "Latitude"]
4867    pub lat: i32,
4868    #[doc = "Longitude"]
4869    pub lon: i32,
4870    #[doc = "Altitude(ASL)"]
4871    pub altitude: i32,
4872    #[doc = "Course over ground"]
4873    pub heading: u16,
4874    #[doc = "The horizontal velocity"]
4875    pub hor_velocity: u16,
4876    #[doc = "The vertical velocity. Positive is up"]
4877    pub ver_velocity: i16,
4878    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4879    pub flags: AdsbFlags,
4880    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4881    pub squawk: u16,
4882    #[doc = "ADSB altitude type."]
4883    pub altitude_type: AdsbAltitudeType,
4884    #[doc = "The callsign, 8+null"]
4885    #[cfg_attr(feature = "ts", ts(type = "string"))]
4886    pub callsign: CharArray<9>,
4887    #[doc = "ADSB emitter type."]
4888    pub emitter_type: AdsbEmitterType,
4889    #[doc = "Time since last communication in seconds"]
4890    pub tslc: u8,
4891}
4892impl ADSB_VEHICLE_DATA {
4893    pub const ENCODED_LEN: usize = 38usize;
4894    pub const DEFAULT: Self = Self {
4895        ICAO_address: 0_u32,
4896        lat: 0_i32,
4897        lon: 0_i32,
4898        altitude: 0_i32,
4899        heading: 0_u16,
4900        hor_velocity: 0_u16,
4901        ver_velocity: 0_i16,
4902        flags: AdsbFlags::DEFAULT,
4903        squawk: 0_u16,
4904        altitude_type: AdsbAltitudeType::DEFAULT,
4905        callsign: CharArray::new([0_u8; 9usize]),
4906        emitter_type: AdsbEmitterType::DEFAULT,
4907        tslc: 0_u8,
4908    };
4909    #[cfg(feature = "arbitrary")]
4910    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4911        use arbitrary::{Arbitrary, Unstructured};
4912        let mut buf = [0u8; 1024];
4913        rng.fill_bytes(&mut buf);
4914        let mut unstructured = Unstructured::new(&buf);
4915        Self::arbitrary(&mut unstructured).unwrap_or_default()
4916    }
4917}
4918impl Default for ADSB_VEHICLE_DATA {
4919    fn default() -> Self {
4920        Self::DEFAULT.clone()
4921    }
4922}
4923impl MessageData for ADSB_VEHICLE_DATA {
4924    type Message = MavMessage;
4925    const ID: u32 = 246u32;
4926    const NAME: &'static str = "ADSB_VEHICLE";
4927    const EXTRA_CRC: u8 = 184u8;
4928    const ENCODED_LEN: usize = 38usize;
4929    fn deser(
4930        _version: MavlinkVersion,
4931        __input: &[u8],
4932    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4933        let avail_len = __input.len();
4934        let mut payload_buf = [0; Self::ENCODED_LEN];
4935        let mut buf = if avail_len < Self::ENCODED_LEN {
4936            payload_buf[0..avail_len].copy_from_slice(__input);
4937            Bytes::new(&payload_buf)
4938        } else {
4939            Bytes::new(__input)
4940        };
4941        let mut __struct = Self::default();
4942        __struct.ICAO_address = buf.get_u32_le();
4943        __struct.lat = buf.get_i32_le();
4944        __struct.lon = buf.get_i32_le();
4945        __struct.altitude = buf.get_i32_le();
4946        __struct.heading = buf.get_u16_le();
4947        __struct.hor_velocity = buf.get_u16_le();
4948        __struct.ver_velocity = buf.get_i16_le();
4949        let tmp = buf.get_u16_le();
4950        __struct.flags = AdsbFlags::from_bits(tmp & AdsbFlags::all().bits()).ok_or(
4951            ::mavlink_core::error::ParserError::InvalidFlag {
4952                flag_type: "AdsbFlags",
4953                value: tmp as u32,
4954            },
4955        )?;
4956        __struct.squawk = buf.get_u16_le();
4957        let tmp = buf.get_u8();
4958        __struct.altitude_type =
4959            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4960                enum_type: "AdsbAltitudeType",
4961                value: tmp as u32,
4962            })?;
4963        let mut tmp = [0_u8; 9usize];
4964        for v in &mut tmp {
4965            *v = buf.get_u8();
4966        }
4967        __struct.callsign = CharArray::new(tmp);
4968        let tmp = buf.get_u8();
4969        __struct.emitter_type =
4970            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4971                enum_type: "AdsbEmitterType",
4972                value: tmp as u32,
4973            })?;
4974        __struct.tslc = buf.get_u8();
4975        Ok(__struct)
4976    }
4977    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4978        let mut __tmp = BytesMut::new(bytes);
4979        #[allow(clippy::absurd_extreme_comparisons)]
4980        #[allow(unused_comparisons)]
4981        if __tmp.remaining() < Self::ENCODED_LEN {
4982            panic!(
4983                "buffer is too small (need {} bytes, but got {})",
4984                Self::ENCODED_LEN,
4985                __tmp.remaining(),
4986            )
4987        }
4988        __tmp.put_u32_le(self.ICAO_address);
4989        __tmp.put_i32_le(self.lat);
4990        __tmp.put_i32_le(self.lon);
4991        __tmp.put_i32_le(self.altitude);
4992        __tmp.put_u16_le(self.heading);
4993        __tmp.put_u16_le(self.hor_velocity);
4994        __tmp.put_i16_le(self.ver_velocity);
4995        __tmp.put_u16_le(self.flags.bits());
4996        __tmp.put_u16_le(self.squawk);
4997        __tmp.put_u8(self.altitude_type as u8);
4998        for val in &self.callsign {
4999            __tmp.put_u8(*val);
5000        }
5001        __tmp.put_u8(self.emitter_type as u8);
5002        __tmp.put_u8(self.tslc);
5003        if matches!(version, MavlinkVersion::V2) {
5004            let len = __tmp.len();
5005            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5006        } else {
5007            __tmp.len()
5008        }
5009    }
5010}
5011#[doc = "The location and information of an AIS vessel."]
5012#[doc = ""]
5013#[doc = "ID: 301"]
5014#[derive(Debug, Clone, PartialEq)]
5015#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5016#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5017#[cfg_attr(feature = "ts", derive(TS))]
5018#[cfg_attr(feature = "ts", ts(export))]
5019pub struct AIS_VESSEL_DATA {
5020    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5021    pub MMSI: u32,
5022    #[doc = "Latitude"]
5023    pub lat: i32,
5024    #[doc = "Longitude"]
5025    pub lon: i32,
5026    #[doc = "Course over ground"]
5027    pub COG: u16,
5028    #[doc = "True heading"]
5029    pub heading: u16,
5030    #[doc = "Speed over ground"]
5031    pub velocity: u16,
5032    #[doc = "Distance from lat/lon location to bow"]
5033    pub dimension_bow: u16,
5034    #[doc = "Distance from lat/lon location to stern"]
5035    pub dimension_stern: u16,
5036    #[doc = "Time since last communication in seconds"]
5037    pub tslc: u16,
5038    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5039    pub flags: AisFlags,
5040    #[doc = "Turn rate"]
5041    pub turn_rate: i8,
5042    #[doc = "Navigational status"]
5043    pub navigational_status: AisNavStatus,
5044    #[doc = "Type of vessels"]
5045    pub mavtype: AisType,
5046    #[doc = "Distance from lat/lon location to port side"]
5047    pub dimension_port: u8,
5048    #[doc = "Distance from lat/lon location to starboard side"]
5049    pub dimension_starboard: u8,
5050    #[doc = "The vessel callsign"]
5051    #[cfg_attr(feature = "ts", ts(type = "string"))]
5052    pub callsign: CharArray<7>,
5053    #[doc = "The vessel name"]
5054    #[cfg_attr(feature = "ts", ts(type = "string"))]
5055    pub name: CharArray<20>,
5056}
5057impl AIS_VESSEL_DATA {
5058    pub const ENCODED_LEN: usize = 58usize;
5059    pub const DEFAULT: Self = Self {
5060        MMSI: 0_u32,
5061        lat: 0_i32,
5062        lon: 0_i32,
5063        COG: 0_u16,
5064        heading: 0_u16,
5065        velocity: 0_u16,
5066        dimension_bow: 0_u16,
5067        dimension_stern: 0_u16,
5068        tslc: 0_u16,
5069        flags: AisFlags::DEFAULT,
5070        turn_rate: 0_i8,
5071        navigational_status: AisNavStatus::DEFAULT,
5072        mavtype: AisType::DEFAULT,
5073        dimension_port: 0_u8,
5074        dimension_starboard: 0_u8,
5075        callsign: CharArray::new([0_u8; 7usize]),
5076        name: CharArray::new([0_u8; 20usize]),
5077    };
5078    #[cfg(feature = "arbitrary")]
5079    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5080        use arbitrary::{Arbitrary, Unstructured};
5081        let mut buf = [0u8; 1024];
5082        rng.fill_bytes(&mut buf);
5083        let mut unstructured = Unstructured::new(&buf);
5084        Self::arbitrary(&mut unstructured).unwrap_or_default()
5085    }
5086}
5087impl Default for AIS_VESSEL_DATA {
5088    fn default() -> Self {
5089        Self::DEFAULT.clone()
5090    }
5091}
5092impl MessageData for AIS_VESSEL_DATA {
5093    type Message = MavMessage;
5094    const ID: u32 = 301u32;
5095    const NAME: &'static str = "AIS_VESSEL";
5096    const EXTRA_CRC: u8 = 243u8;
5097    const ENCODED_LEN: usize = 58usize;
5098    fn deser(
5099        _version: MavlinkVersion,
5100        __input: &[u8],
5101    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5102        let avail_len = __input.len();
5103        let mut payload_buf = [0; Self::ENCODED_LEN];
5104        let mut buf = if avail_len < Self::ENCODED_LEN {
5105            payload_buf[0..avail_len].copy_from_slice(__input);
5106            Bytes::new(&payload_buf)
5107        } else {
5108            Bytes::new(__input)
5109        };
5110        let mut __struct = Self::default();
5111        __struct.MMSI = buf.get_u32_le();
5112        __struct.lat = buf.get_i32_le();
5113        __struct.lon = buf.get_i32_le();
5114        __struct.COG = buf.get_u16_le();
5115        __struct.heading = buf.get_u16_le();
5116        __struct.velocity = buf.get_u16_le();
5117        __struct.dimension_bow = buf.get_u16_le();
5118        __struct.dimension_stern = buf.get_u16_le();
5119        __struct.tslc = buf.get_u16_le();
5120        let tmp = buf.get_u16_le();
5121        __struct.flags = AisFlags::from_bits(tmp & AisFlags::all().bits()).ok_or(
5122            ::mavlink_core::error::ParserError::InvalidFlag {
5123                flag_type: "AisFlags",
5124                value: tmp as u32,
5125            },
5126        )?;
5127        __struct.turn_rate = buf.get_i8();
5128        let tmp = buf.get_u8();
5129        __struct.navigational_status =
5130            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5131                enum_type: "AisNavStatus",
5132                value: tmp as u32,
5133            })?;
5134        let tmp = buf.get_u8();
5135        __struct.mavtype =
5136            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5137                enum_type: "AisType",
5138                value: tmp as u32,
5139            })?;
5140        __struct.dimension_port = buf.get_u8();
5141        __struct.dimension_starboard = buf.get_u8();
5142        let mut tmp = [0_u8; 7usize];
5143        for v in &mut tmp {
5144            *v = buf.get_u8();
5145        }
5146        __struct.callsign = CharArray::new(tmp);
5147        let mut tmp = [0_u8; 20usize];
5148        for v in &mut tmp {
5149            *v = buf.get_u8();
5150        }
5151        __struct.name = CharArray::new(tmp);
5152        Ok(__struct)
5153    }
5154    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5155        let mut __tmp = BytesMut::new(bytes);
5156        #[allow(clippy::absurd_extreme_comparisons)]
5157        #[allow(unused_comparisons)]
5158        if __tmp.remaining() < Self::ENCODED_LEN {
5159            panic!(
5160                "buffer is too small (need {} bytes, but got {})",
5161                Self::ENCODED_LEN,
5162                __tmp.remaining(),
5163            )
5164        }
5165        __tmp.put_u32_le(self.MMSI);
5166        __tmp.put_i32_le(self.lat);
5167        __tmp.put_i32_le(self.lon);
5168        __tmp.put_u16_le(self.COG);
5169        __tmp.put_u16_le(self.heading);
5170        __tmp.put_u16_le(self.velocity);
5171        __tmp.put_u16_le(self.dimension_bow);
5172        __tmp.put_u16_le(self.dimension_stern);
5173        __tmp.put_u16_le(self.tslc);
5174        __tmp.put_u16_le(self.flags.bits());
5175        __tmp.put_i8(self.turn_rate);
5176        __tmp.put_u8(self.navigational_status as u8);
5177        __tmp.put_u8(self.mavtype as u8);
5178        __tmp.put_u8(self.dimension_port);
5179        __tmp.put_u8(self.dimension_starboard);
5180        for val in &self.callsign {
5181            __tmp.put_u8(*val);
5182        }
5183        for val in &self.name {
5184            __tmp.put_u8(*val);
5185        }
5186        if matches!(version, MavlinkVersion::V2) {
5187            let len = __tmp.len();
5188            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5189        } else {
5190            __tmp.len()
5191        }
5192    }
5193}
5194#[doc = "The current system altitude."]
5195#[doc = ""]
5196#[doc = "ID: 141"]
5197#[derive(Debug, Clone, PartialEq)]
5198#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5199#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5200#[cfg_attr(feature = "ts", derive(TS))]
5201#[cfg_attr(feature = "ts", ts(export))]
5202pub struct ALTITUDE_DATA {
5203    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5204    pub time_usec: u64,
5205    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5206    pub altitude_monotonic: f32,
5207    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5208    pub altitude_amsl: f32,
5209    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5210    pub altitude_local: f32,
5211    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5212    pub altitude_relative: f32,
5213    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5214    pub altitude_terrain: f32,
5215    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5216    pub bottom_clearance: f32,
5217}
5218impl ALTITUDE_DATA {
5219    pub const ENCODED_LEN: usize = 32usize;
5220    pub const DEFAULT: Self = Self {
5221        time_usec: 0_u64,
5222        altitude_monotonic: 0.0_f32,
5223        altitude_amsl: 0.0_f32,
5224        altitude_local: 0.0_f32,
5225        altitude_relative: 0.0_f32,
5226        altitude_terrain: 0.0_f32,
5227        bottom_clearance: 0.0_f32,
5228    };
5229    #[cfg(feature = "arbitrary")]
5230    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5231        use arbitrary::{Arbitrary, Unstructured};
5232        let mut buf = [0u8; 1024];
5233        rng.fill_bytes(&mut buf);
5234        let mut unstructured = Unstructured::new(&buf);
5235        Self::arbitrary(&mut unstructured).unwrap_or_default()
5236    }
5237}
5238impl Default for ALTITUDE_DATA {
5239    fn default() -> Self {
5240        Self::DEFAULT.clone()
5241    }
5242}
5243impl MessageData for ALTITUDE_DATA {
5244    type Message = MavMessage;
5245    const ID: u32 = 141u32;
5246    const NAME: &'static str = "ALTITUDE";
5247    const EXTRA_CRC: u8 = 47u8;
5248    const ENCODED_LEN: usize = 32usize;
5249    fn deser(
5250        _version: MavlinkVersion,
5251        __input: &[u8],
5252    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5253        let avail_len = __input.len();
5254        let mut payload_buf = [0; Self::ENCODED_LEN];
5255        let mut buf = if avail_len < Self::ENCODED_LEN {
5256            payload_buf[0..avail_len].copy_from_slice(__input);
5257            Bytes::new(&payload_buf)
5258        } else {
5259            Bytes::new(__input)
5260        };
5261        let mut __struct = Self::default();
5262        __struct.time_usec = buf.get_u64_le();
5263        __struct.altitude_monotonic = buf.get_f32_le();
5264        __struct.altitude_amsl = buf.get_f32_le();
5265        __struct.altitude_local = buf.get_f32_le();
5266        __struct.altitude_relative = buf.get_f32_le();
5267        __struct.altitude_terrain = buf.get_f32_le();
5268        __struct.bottom_clearance = buf.get_f32_le();
5269        Ok(__struct)
5270    }
5271    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5272        let mut __tmp = BytesMut::new(bytes);
5273        #[allow(clippy::absurd_extreme_comparisons)]
5274        #[allow(unused_comparisons)]
5275        if __tmp.remaining() < Self::ENCODED_LEN {
5276            panic!(
5277                "buffer is too small (need {} bytes, but got {})",
5278                Self::ENCODED_LEN,
5279                __tmp.remaining(),
5280            )
5281        }
5282        __tmp.put_u64_le(self.time_usec);
5283        __tmp.put_f32_le(self.altitude_monotonic);
5284        __tmp.put_f32_le(self.altitude_amsl);
5285        __tmp.put_f32_le(self.altitude_local);
5286        __tmp.put_f32_le(self.altitude_relative);
5287        __tmp.put_f32_le(self.altitude_terrain);
5288        __tmp.put_f32_le(self.bottom_clearance);
5289        if matches!(version, MavlinkVersion::V2) {
5290            let len = __tmp.len();
5291            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5292        } else {
5293            __tmp.len()
5294        }
5295    }
5296}
5297#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5298#[doc = ""]
5299#[doc = "ID: 30"]
5300#[derive(Debug, Clone, PartialEq)]
5301#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5302#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5303#[cfg_attr(feature = "ts", derive(TS))]
5304#[cfg_attr(feature = "ts", ts(export))]
5305pub struct ATTITUDE_DATA {
5306    #[doc = "Timestamp (time since system boot)."]
5307    pub time_boot_ms: u32,
5308    #[doc = "Roll angle (-pi..+pi)"]
5309    pub roll: f32,
5310    #[doc = "Pitch angle (-pi..+pi)"]
5311    pub pitch: f32,
5312    #[doc = "Yaw angle (-pi..+pi)"]
5313    pub yaw: f32,
5314    #[doc = "Roll angular speed"]
5315    pub rollspeed: f32,
5316    #[doc = "Pitch angular speed"]
5317    pub pitchspeed: f32,
5318    #[doc = "Yaw angular speed"]
5319    pub yawspeed: f32,
5320}
5321impl ATTITUDE_DATA {
5322    pub const ENCODED_LEN: usize = 28usize;
5323    pub const DEFAULT: Self = Self {
5324        time_boot_ms: 0_u32,
5325        roll: 0.0_f32,
5326        pitch: 0.0_f32,
5327        yaw: 0.0_f32,
5328        rollspeed: 0.0_f32,
5329        pitchspeed: 0.0_f32,
5330        yawspeed: 0.0_f32,
5331    };
5332    #[cfg(feature = "arbitrary")]
5333    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5334        use arbitrary::{Arbitrary, Unstructured};
5335        let mut buf = [0u8; 1024];
5336        rng.fill_bytes(&mut buf);
5337        let mut unstructured = Unstructured::new(&buf);
5338        Self::arbitrary(&mut unstructured).unwrap_or_default()
5339    }
5340}
5341impl Default for ATTITUDE_DATA {
5342    fn default() -> Self {
5343        Self::DEFAULT.clone()
5344    }
5345}
5346impl MessageData for ATTITUDE_DATA {
5347    type Message = MavMessage;
5348    const ID: u32 = 30u32;
5349    const NAME: &'static str = "ATTITUDE";
5350    const EXTRA_CRC: u8 = 39u8;
5351    const ENCODED_LEN: usize = 28usize;
5352    fn deser(
5353        _version: MavlinkVersion,
5354        __input: &[u8],
5355    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5356        let avail_len = __input.len();
5357        let mut payload_buf = [0; Self::ENCODED_LEN];
5358        let mut buf = if avail_len < Self::ENCODED_LEN {
5359            payload_buf[0..avail_len].copy_from_slice(__input);
5360            Bytes::new(&payload_buf)
5361        } else {
5362            Bytes::new(__input)
5363        };
5364        let mut __struct = Self::default();
5365        __struct.time_boot_ms = buf.get_u32_le();
5366        __struct.roll = buf.get_f32_le();
5367        __struct.pitch = buf.get_f32_le();
5368        __struct.yaw = buf.get_f32_le();
5369        __struct.rollspeed = buf.get_f32_le();
5370        __struct.pitchspeed = buf.get_f32_le();
5371        __struct.yawspeed = buf.get_f32_le();
5372        Ok(__struct)
5373    }
5374    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5375        let mut __tmp = BytesMut::new(bytes);
5376        #[allow(clippy::absurd_extreme_comparisons)]
5377        #[allow(unused_comparisons)]
5378        if __tmp.remaining() < Self::ENCODED_LEN {
5379            panic!(
5380                "buffer is too small (need {} bytes, but got {})",
5381                Self::ENCODED_LEN,
5382                __tmp.remaining(),
5383            )
5384        }
5385        __tmp.put_u32_le(self.time_boot_ms);
5386        __tmp.put_f32_le(self.roll);
5387        __tmp.put_f32_le(self.pitch);
5388        __tmp.put_f32_le(self.yaw);
5389        __tmp.put_f32_le(self.rollspeed);
5390        __tmp.put_f32_le(self.pitchspeed);
5391        __tmp.put_f32_le(self.yawspeed);
5392        if matches!(version, MavlinkVersion::V2) {
5393            let len = __tmp.len();
5394            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5395        } else {
5396            __tmp.len()
5397        }
5398    }
5399}
5400#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5401#[doc = ""]
5402#[doc = "ID: 31"]
5403#[derive(Debug, Clone, PartialEq)]
5404#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5405#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5406#[cfg_attr(feature = "ts", derive(TS))]
5407#[cfg_attr(feature = "ts", ts(export))]
5408pub struct ATTITUDE_QUATERNION_DATA {
5409    #[doc = "Timestamp (time since system boot)."]
5410    pub time_boot_ms: u32,
5411    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5412    pub q1: f32,
5413    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5414    pub q2: f32,
5415    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5416    pub q3: f32,
5417    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5418    pub q4: f32,
5419    #[doc = "Roll angular speed"]
5420    pub rollspeed: f32,
5421    #[doc = "Pitch angular speed"]
5422    pub pitchspeed: f32,
5423    #[doc = "Yaw angular speed"]
5424    pub yawspeed: f32,
5425    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5426    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5427    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5428    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5429    pub repr_offset_q: [f32; 4],
5430}
5431impl ATTITUDE_QUATERNION_DATA {
5432    pub const ENCODED_LEN: usize = 48usize;
5433    pub const DEFAULT: Self = Self {
5434        time_boot_ms: 0_u32,
5435        q1: 0.0_f32,
5436        q2: 0.0_f32,
5437        q3: 0.0_f32,
5438        q4: 0.0_f32,
5439        rollspeed: 0.0_f32,
5440        pitchspeed: 0.0_f32,
5441        yawspeed: 0.0_f32,
5442        repr_offset_q: [0.0_f32; 4usize],
5443    };
5444    #[cfg(feature = "arbitrary")]
5445    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5446        use arbitrary::{Arbitrary, Unstructured};
5447        let mut buf = [0u8; 1024];
5448        rng.fill_bytes(&mut buf);
5449        let mut unstructured = Unstructured::new(&buf);
5450        Self::arbitrary(&mut unstructured).unwrap_or_default()
5451    }
5452}
5453impl Default for ATTITUDE_QUATERNION_DATA {
5454    fn default() -> Self {
5455        Self::DEFAULT.clone()
5456    }
5457}
5458impl MessageData for ATTITUDE_QUATERNION_DATA {
5459    type Message = MavMessage;
5460    const ID: u32 = 31u32;
5461    const NAME: &'static str = "ATTITUDE_QUATERNION";
5462    const EXTRA_CRC: u8 = 246u8;
5463    const ENCODED_LEN: usize = 48usize;
5464    fn deser(
5465        _version: MavlinkVersion,
5466        __input: &[u8],
5467    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5468        let avail_len = __input.len();
5469        let mut payload_buf = [0; Self::ENCODED_LEN];
5470        let mut buf = if avail_len < Self::ENCODED_LEN {
5471            payload_buf[0..avail_len].copy_from_slice(__input);
5472            Bytes::new(&payload_buf)
5473        } else {
5474            Bytes::new(__input)
5475        };
5476        let mut __struct = Self::default();
5477        __struct.time_boot_ms = buf.get_u32_le();
5478        __struct.q1 = buf.get_f32_le();
5479        __struct.q2 = buf.get_f32_le();
5480        __struct.q3 = buf.get_f32_le();
5481        __struct.q4 = buf.get_f32_le();
5482        __struct.rollspeed = buf.get_f32_le();
5483        __struct.pitchspeed = buf.get_f32_le();
5484        __struct.yawspeed = buf.get_f32_le();
5485        for v in &mut __struct.repr_offset_q {
5486            let val = buf.get_f32_le();
5487            *v = val;
5488        }
5489        Ok(__struct)
5490    }
5491    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5492        let mut __tmp = BytesMut::new(bytes);
5493        #[allow(clippy::absurd_extreme_comparisons)]
5494        #[allow(unused_comparisons)]
5495        if __tmp.remaining() < Self::ENCODED_LEN {
5496            panic!(
5497                "buffer is too small (need {} bytes, but got {})",
5498                Self::ENCODED_LEN,
5499                __tmp.remaining(),
5500            )
5501        }
5502        __tmp.put_u32_le(self.time_boot_ms);
5503        __tmp.put_f32_le(self.q1);
5504        __tmp.put_f32_le(self.q2);
5505        __tmp.put_f32_le(self.q3);
5506        __tmp.put_f32_le(self.q4);
5507        __tmp.put_f32_le(self.rollspeed);
5508        __tmp.put_f32_le(self.pitchspeed);
5509        __tmp.put_f32_le(self.yawspeed);
5510        if matches!(version, MavlinkVersion::V2) {
5511            for val in &self.repr_offset_q {
5512                __tmp.put_f32_le(*val);
5513            }
5514            let len = __tmp.len();
5515            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5516        } else {
5517            __tmp.len()
5518        }
5519    }
5520}
5521#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5522#[doc = ""]
5523#[doc = "ID: 61"]
5524#[derive(Debug, Clone, PartialEq)]
5525#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5526#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5527#[cfg_attr(feature = "ts", derive(TS))]
5528#[cfg_attr(feature = "ts", ts(export))]
5529pub struct ATTITUDE_QUATERNION_COV_DATA {
5530    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5531    pub time_usec: u64,
5532    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5533    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5534    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5535    pub q: [f32; 4],
5536    #[doc = "Roll angular speed"]
5537    pub rollspeed: f32,
5538    #[doc = "Pitch angular speed"]
5539    pub pitchspeed: f32,
5540    #[doc = "Yaw angular speed"]
5541    pub yawspeed: f32,
5542    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5543    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5544    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5545    pub covariance: [f32; 9],
5546}
5547impl ATTITUDE_QUATERNION_COV_DATA {
5548    pub const ENCODED_LEN: usize = 72usize;
5549    pub const DEFAULT: Self = Self {
5550        time_usec: 0_u64,
5551        q: [0.0_f32; 4usize],
5552        rollspeed: 0.0_f32,
5553        pitchspeed: 0.0_f32,
5554        yawspeed: 0.0_f32,
5555        covariance: [0.0_f32; 9usize],
5556    };
5557    #[cfg(feature = "arbitrary")]
5558    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5559        use arbitrary::{Arbitrary, Unstructured};
5560        let mut buf = [0u8; 1024];
5561        rng.fill_bytes(&mut buf);
5562        let mut unstructured = Unstructured::new(&buf);
5563        Self::arbitrary(&mut unstructured).unwrap_or_default()
5564    }
5565}
5566impl Default for ATTITUDE_QUATERNION_COV_DATA {
5567    fn default() -> Self {
5568        Self::DEFAULT.clone()
5569    }
5570}
5571impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5572    type Message = MavMessage;
5573    const ID: u32 = 61u32;
5574    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5575    const EXTRA_CRC: u8 = 167u8;
5576    const ENCODED_LEN: usize = 72usize;
5577    fn deser(
5578        _version: MavlinkVersion,
5579        __input: &[u8],
5580    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5581        let avail_len = __input.len();
5582        let mut payload_buf = [0; Self::ENCODED_LEN];
5583        let mut buf = if avail_len < Self::ENCODED_LEN {
5584            payload_buf[0..avail_len].copy_from_slice(__input);
5585            Bytes::new(&payload_buf)
5586        } else {
5587            Bytes::new(__input)
5588        };
5589        let mut __struct = Self::default();
5590        __struct.time_usec = buf.get_u64_le();
5591        for v in &mut __struct.q {
5592            let val = buf.get_f32_le();
5593            *v = val;
5594        }
5595        __struct.rollspeed = buf.get_f32_le();
5596        __struct.pitchspeed = buf.get_f32_le();
5597        __struct.yawspeed = buf.get_f32_le();
5598        for v in &mut __struct.covariance {
5599            let val = buf.get_f32_le();
5600            *v = val;
5601        }
5602        Ok(__struct)
5603    }
5604    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5605        let mut __tmp = BytesMut::new(bytes);
5606        #[allow(clippy::absurd_extreme_comparisons)]
5607        #[allow(unused_comparisons)]
5608        if __tmp.remaining() < Self::ENCODED_LEN {
5609            panic!(
5610                "buffer is too small (need {} bytes, but got {})",
5611                Self::ENCODED_LEN,
5612                __tmp.remaining(),
5613            )
5614        }
5615        __tmp.put_u64_le(self.time_usec);
5616        for val in &self.q {
5617            __tmp.put_f32_le(*val);
5618        }
5619        __tmp.put_f32_le(self.rollspeed);
5620        __tmp.put_f32_le(self.pitchspeed);
5621        __tmp.put_f32_le(self.yawspeed);
5622        for val in &self.covariance {
5623            __tmp.put_f32_le(*val);
5624        }
5625        if matches!(version, MavlinkVersion::V2) {
5626            let len = __tmp.len();
5627            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5628        } else {
5629            __tmp.len()
5630        }
5631    }
5632}
5633#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5634#[doc = ""]
5635#[doc = "ID: 83"]
5636#[derive(Debug, Clone, PartialEq)]
5637#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5638#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5639#[cfg_attr(feature = "ts", derive(TS))]
5640#[cfg_attr(feature = "ts", ts(export))]
5641pub struct ATTITUDE_TARGET_DATA {
5642    #[doc = "Timestamp (time since system boot)."]
5643    pub time_boot_ms: u32,
5644    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5645    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5646    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5647    pub q: [f32; 4],
5648    #[doc = "Body roll rate"]
5649    pub body_roll_rate: f32,
5650    #[doc = "Body pitch rate"]
5651    pub body_pitch_rate: f32,
5652    #[doc = "Body yaw rate"]
5653    pub body_yaw_rate: f32,
5654    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5655    pub thrust: f32,
5656    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5657    pub type_mask: AttitudeTargetTypemask,
5658}
5659impl ATTITUDE_TARGET_DATA {
5660    pub const ENCODED_LEN: usize = 37usize;
5661    pub const DEFAULT: Self = Self {
5662        time_boot_ms: 0_u32,
5663        q: [0.0_f32; 4usize],
5664        body_roll_rate: 0.0_f32,
5665        body_pitch_rate: 0.0_f32,
5666        body_yaw_rate: 0.0_f32,
5667        thrust: 0.0_f32,
5668        type_mask: AttitudeTargetTypemask::DEFAULT,
5669    };
5670    #[cfg(feature = "arbitrary")]
5671    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5672        use arbitrary::{Arbitrary, Unstructured};
5673        let mut buf = [0u8; 1024];
5674        rng.fill_bytes(&mut buf);
5675        let mut unstructured = Unstructured::new(&buf);
5676        Self::arbitrary(&mut unstructured).unwrap_or_default()
5677    }
5678}
5679impl Default for ATTITUDE_TARGET_DATA {
5680    fn default() -> Self {
5681        Self::DEFAULT.clone()
5682    }
5683}
5684impl MessageData for ATTITUDE_TARGET_DATA {
5685    type Message = MavMessage;
5686    const ID: u32 = 83u32;
5687    const NAME: &'static str = "ATTITUDE_TARGET";
5688    const EXTRA_CRC: u8 = 22u8;
5689    const ENCODED_LEN: usize = 37usize;
5690    fn deser(
5691        _version: MavlinkVersion,
5692        __input: &[u8],
5693    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5694        let avail_len = __input.len();
5695        let mut payload_buf = [0; Self::ENCODED_LEN];
5696        let mut buf = if avail_len < Self::ENCODED_LEN {
5697            payload_buf[0..avail_len].copy_from_slice(__input);
5698            Bytes::new(&payload_buf)
5699        } else {
5700            Bytes::new(__input)
5701        };
5702        let mut __struct = Self::default();
5703        __struct.time_boot_ms = buf.get_u32_le();
5704        for v in &mut __struct.q {
5705            let val = buf.get_f32_le();
5706            *v = val;
5707        }
5708        __struct.body_roll_rate = buf.get_f32_le();
5709        __struct.body_pitch_rate = buf.get_f32_le();
5710        __struct.body_yaw_rate = buf.get_f32_le();
5711        __struct.thrust = buf.get_f32_le();
5712        let tmp = buf.get_u8();
5713        __struct.type_mask = AttitudeTargetTypemask::from_bits(
5714            tmp & AttitudeTargetTypemask::all().bits(),
5715        )
5716        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5717            flag_type: "AttitudeTargetTypemask",
5718            value: tmp as u32,
5719        })?;
5720        Ok(__struct)
5721    }
5722    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5723        let mut __tmp = BytesMut::new(bytes);
5724        #[allow(clippy::absurd_extreme_comparisons)]
5725        #[allow(unused_comparisons)]
5726        if __tmp.remaining() < Self::ENCODED_LEN {
5727            panic!(
5728                "buffer is too small (need {} bytes, but got {})",
5729                Self::ENCODED_LEN,
5730                __tmp.remaining(),
5731            )
5732        }
5733        __tmp.put_u32_le(self.time_boot_ms);
5734        for val in &self.q {
5735            __tmp.put_f32_le(*val);
5736        }
5737        __tmp.put_f32_le(self.body_roll_rate);
5738        __tmp.put_f32_le(self.body_pitch_rate);
5739        __tmp.put_f32_le(self.body_yaw_rate);
5740        __tmp.put_f32_le(self.thrust);
5741        __tmp.put_u8(self.type_mask.bits());
5742        if matches!(version, MavlinkVersion::V2) {
5743            let len = __tmp.len();
5744            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5745        } else {
5746            __tmp.len()
5747        }
5748    }
5749}
5750#[doc = "Motion capture attitude and position."]
5751#[doc = ""]
5752#[doc = "ID: 138"]
5753#[derive(Debug, Clone, PartialEq)]
5754#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5755#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5756#[cfg_attr(feature = "ts", derive(TS))]
5757#[cfg_attr(feature = "ts", ts(export))]
5758pub struct ATT_POS_MOCAP_DATA {
5759    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5760    pub time_usec: u64,
5761    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5762    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5763    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5764    pub q: [f32; 4],
5765    #[doc = "X position (NED)"]
5766    pub x: f32,
5767    #[doc = "Y position (NED)"]
5768    pub y: f32,
5769    #[doc = "Z position (NED)"]
5770    pub z: f32,
5771    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
5772    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5773    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5774    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5775    pub covariance: [f32; 21],
5776}
5777impl ATT_POS_MOCAP_DATA {
5778    pub const ENCODED_LEN: usize = 120usize;
5779    pub const DEFAULT: Self = Self {
5780        time_usec: 0_u64,
5781        q: [0.0_f32; 4usize],
5782        x: 0.0_f32,
5783        y: 0.0_f32,
5784        z: 0.0_f32,
5785        covariance: [0.0_f32; 21usize],
5786    };
5787    #[cfg(feature = "arbitrary")]
5788    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5789        use arbitrary::{Arbitrary, Unstructured};
5790        let mut buf = [0u8; 1024];
5791        rng.fill_bytes(&mut buf);
5792        let mut unstructured = Unstructured::new(&buf);
5793        Self::arbitrary(&mut unstructured).unwrap_or_default()
5794    }
5795}
5796impl Default for ATT_POS_MOCAP_DATA {
5797    fn default() -> Self {
5798        Self::DEFAULT.clone()
5799    }
5800}
5801impl MessageData for ATT_POS_MOCAP_DATA {
5802    type Message = MavMessage;
5803    const ID: u32 = 138u32;
5804    const NAME: &'static str = "ATT_POS_MOCAP";
5805    const EXTRA_CRC: u8 = 109u8;
5806    const ENCODED_LEN: usize = 120usize;
5807    fn deser(
5808        _version: MavlinkVersion,
5809        __input: &[u8],
5810    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5811        let avail_len = __input.len();
5812        let mut payload_buf = [0; Self::ENCODED_LEN];
5813        let mut buf = if avail_len < Self::ENCODED_LEN {
5814            payload_buf[0..avail_len].copy_from_slice(__input);
5815            Bytes::new(&payload_buf)
5816        } else {
5817            Bytes::new(__input)
5818        };
5819        let mut __struct = Self::default();
5820        __struct.time_usec = buf.get_u64_le();
5821        for v in &mut __struct.q {
5822            let val = buf.get_f32_le();
5823            *v = val;
5824        }
5825        __struct.x = buf.get_f32_le();
5826        __struct.y = buf.get_f32_le();
5827        __struct.z = buf.get_f32_le();
5828        for v in &mut __struct.covariance {
5829            let val = buf.get_f32_le();
5830            *v = val;
5831        }
5832        Ok(__struct)
5833    }
5834    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5835        let mut __tmp = BytesMut::new(bytes);
5836        #[allow(clippy::absurd_extreme_comparisons)]
5837        #[allow(unused_comparisons)]
5838        if __tmp.remaining() < Self::ENCODED_LEN {
5839            panic!(
5840                "buffer is too small (need {} bytes, but got {})",
5841                Self::ENCODED_LEN,
5842                __tmp.remaining(),
5843            )
5844        }
5845        __tmp.put_u64_le(self.time_usec);
5846        for val in &self.q {
5847            __tmp.put_f32_le(*val);
5848        }
5849        __tmp.put_f32_le(self.x);
5850        __tmp.put_f32_le(self.y);
5851        __tmp.put_f32_le(self.z);
5852        if matches!(version, MavlinkVersion::V2) {
5853            for val in &self.covariance {
5854                __tmp.put_f32_le(*val);
5855            }
5856            let len = __tmp.len();
5857            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5858        } else {
5859            __tmp.len()
5860        }
5861    }
5862}
5863#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
5864#[doc = ""]
5865#[doc = "ID: 7"]
5866#[derive(Debug, Clone, PartialEq)]
5867#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5868#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5869#[cfg_attr(feature = "ts", derive(TS))]
5870#[cfg_attr(feature = "ts", ts(export))]
5871pub struct AUTH_KEY_DATA {
5872    #[doc = "key"]
5873    #[cfg_attr(feature = "ts", ts(type = "string"))]
5874    pub key: CharArray<32>,
5875}
5876impl AUTH_KEY_DATA {
5877    pub const ENCODED_LEN: usize = 32usize;
5878    pub const DEFAULT: Self = Self {
5879        key: CharArray::new([0_u8; 32usize]),
5880    };
5881    #[cfg(feature = "arbitrary")]
5882    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5883        use arbitrary::{Arbitrary, Unstructured};
5884        let mut buf = [0u8; 1024];
5885        rng.fill_bytes(&mut buf);
5886        let mut unstructured = Unstructured::new(&buf);
5887        Self::arbitrary(&mut unstructured).unwrap_or_default()
5888    }
5889}
5890impl Default for AUTH_KEY_DATA {
5891    fn default() -> Self {
5892        Self::DEFAULT.clone()
5893    }
5894}
5895impl MessageData for AUTH_KEY_DATA {
5896    type Message = MavMessage;
5897    const ID: u32 = 7u32;
5898    const NAME: &'static str = "AUTH_KEY";
5899    const EXTRA_CRC: u8 = 119u8;
5900    const ENCODED_LEN: usize = 32usize;
5901    fn deser(
5902        _version: MavlinkVersion,
5903        __input: &[u8],
5904    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5905        let avail_len = __input.len();
5906        let mut payload_buf = [0; Self::ENCODED_LEN];
5907        let mut buf = if avail_len < Self::ENCODED_LEN {
5908            payload_buf[0..avail_len].copy_from_slice(__input);
5909            Bytes::new(&payload_buf)
5910        } else {
5911            Bytes::new(__input)
5912        };
5913        let mut __struct = Self::default();
5914        let mut tmp = [0_u8; 32usize];
5915        for v in &mut tmp {
5916            *v = buf.get_u8();
5917        }
5918        __struct.key = CharArray::new(tmp);
5919        Ok(__struct)
5920    }
5921    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5922        let mut __tmp = BytesMut::new(bytes);
5923        #[allow(clippy::absurd_extreme_comparisons)]
5924        #[allow(unused_comparisons)]
5925        if __tmp.remaining() < Self::ENCODED_LEN {
5926            panic!(
5927                "buffer is too small (need {} bytes, but got {})",
5928                Self::ENCODED_LEN,
5929                __tmp.remaining(),
5930            )
5931        }
5932        for val in &self.key {
5933            __tmp.put_u8(*val);
5934        }
5935        if matches!(version, MavlinkVersion::V2) {
5936            let len = __tmp.len();
5937            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5938        } else {
5939            __tmp.len()
5940        }
5941    }
5942}
5943#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
5944#[doc = ""]
5945#[doc = "ID: 286"]
5946#[derive(Debug, Clone, PartialEq)]
5947#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5948#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5949#[cfg_attr(feature = "ts", derive(TS))]
5950#[cfg_attr(feature = "ts", ts(export))]
5951pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5952    #[doc = "Timestamp (time since system boot)."]
5953    pub time_boot_us: u64,
5954    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
5955    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5956    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5957    pub q: [f32; 4],
5958    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
5959    pub q_estimated_delay_us: u32,
5960    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
5961    pub vx: f32,
5962    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
5963    pub vy: f32,
5964    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
5965    pub vz: f32,
5966    #[doc = "Estimated delay of the speed data. 0 if unknown."]
5967    pub v_estimated_delay_us: u32,
5968    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
5969    pub feed_forward_angular_velocity_z: f32,
5970    #[doc = "Bitmap indicating which estimator outputs are valid."]
5971    pub estimator_status: EstimatorStatusFlags,
5972    #[doc = "System ID"]
5973    pub target_system: u8,
5974    #[doc = "Component ID"]
5975    pub target_component: u8,
5976    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
5977    pub landed_state: MavLandedState,
5978    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
5979    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5980    pub angular_velocity_z: f32,
5981}
5982impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5983    pub const ENCODED_LEN: usize = 57usize;
5984    pub const DEFAULT: Self = Self {
5985        time_boot_us: 0_u64,
5986        q: [0.0_f32; 4usize],
5987        q_estimated_delay_us: 0_u32,
5988        vx: 0.0_f32,
5989        vy: 0.0_f32,
5990        vz: 0.0_f32,
5991        v_estimated_delay_us: 0_u32,
5992        feed_forward_angular_velocity_z: 0.0_f32,
5993        estimator_status: EstimatorStatusFlags::DEFAULT,
5994        target_system: 0_u8,
5995        target_component: 0_u8,
5996        landed_state: MavLandedState::DEFAULT,
5997        angular_velocity_z: 0.0_f32,
5998    };
5999    #[cfg(feature = "arbitrary")]
6000    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6001        use arbitrary::{Arbitrary, Unstructured};
6002        let mut buf = [0u8; 1024];
6003        rng.fill_bytes(&mut buf);
6004        let mut unstructured = Unstructured::new(&buf);
6005        Self::arbitrary(&mut unstructured).unwrap_or_default()
6006    }
6007}
6008impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6009    fn default() -> Self {
6010        Self::DEFAULT.clone()
6011    }
6012}
6013impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6014    type Message = MavMessage;
6015    const ID: u32 = 286u32;
6016    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6017    const EXTRA_CRC: u8 = 210u8;
6018    const ENCODED_LEN: usize = 57usize;
6019    fn deser(
6020        _version: MavlinkVersion,
6021        __input: &[u8],
6022    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6023        let avail_len = __input.len();
6024        let mut payload_buf = [0; Self::ENCODED_LEN];
6025        let mut buf = if avail_len < Self::ENCODED_LEN {
6026            payload_buf[0..avail_len].copy_from_slice(__input);
6027            Bytes::new(&payload_buf)
6028        } else {
6029            Bytes::new(__input)
6030        };
6031        let mut __struct = Self::default();
6032        __struct.time_boot_us = buf.get_u64_le();
6033        for v in &mut __struct.q {
6034            let val = buf.get_f32_le();
6035            *v = val;
6036        }
6037        __struct.q_estimated_delay_us = buf.get_u32_le();
6038        __struct.vx = buf.get_f32_le();
6039        __struct.vy = buf.get_f32_le();
6040        __struct.vz = buf.get_f32_le();
6041        __struct.v_estimated_delay_us = buf.get_u32_le();
6042        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
6043        let tmp = buf.get_u16_le();
6044        __struct.estimator_status = EstimatorStatusFlags::from_bits(
6045            tmp & EstimatorStatusFlags::all().bits(),
6046        )
6047        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6048            flag_type: "EstimatorStatusFlags",
6049            value: tmp as u32,
6050        })?;
6051        __struct.target_system = buf.get_u8();
6052        __struct.target_component = buf.get_u8();
6053        let tmp = buf.get_u8();
6054        __struct.landed_state =
6055            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6056                enum_type: "MavLandedState",
6057                value: tmp as u32,
6058            })?;
6059        __struct.angular_velocity_z = buf.get_f32_le();
6060        Ok(__struct)
6061    }
6062    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6063        let mut __tmp = BytesMut::new(bytes);
6064        #[allow(clippy::absurd_extreme_comparisons)]
6065        #[allow(unused_comparisons)]
6066        if __tmp.remaining() < Self::ENCODED_LEN {
6067            panic!(
6068                "buffer is too small (need {} bytes, but got {})",
6069                Self::ENCODED_LEN,
6070                __tmp.remaining(),
6071            )
6072        }
6073        __tmp.put_u64_le(self.time_boot_us);
6074        for val in &self.q {
6075            __tmp.put_f32_le(*val);
6076        }
6077        __tmp.put_u32_le(self.q_estimated_delay_us);
6078        __tmp.put_f32_le(self.vx);
6079        __tmp.put_f32_le(self.vy);
6080        __tmp.put_f32_le(self.vz);
6081        __tmp.put_u32_le(self.v_estimated_delay_us);
6082        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6083        __tmp.put_u16_le(self.estimator_status.bits());
6084        __tmp.put_u8(self.target_system);
6085        __tmp.put_u8(self.target_component);
6086        __tmp.put_u8(self.landed_state as u8);
6087        if matches!(version, MavlinkVersion::V2) {
6088            __tmp.put_f32_le(self.angular_velocity_z);
6089            let len = __tmp.len();
6090            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6091        } else {
6092            __tmp.len()
6093        }
6094    }
6095}
6096#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6097#[doc = ""]
6098#[doc = "ID: 148"]
6099#[derive(Debug, Clone, PartialEq)]
6100#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6101#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6102#[cfg_attr(feature = "ts", derive(TS))]
6103#[cfg_attr(feature = "ts", ts(export))]
6104pub struct AUTOPILOT_VERSION_DATA {
6105    #[doc = "Bitmap of capabilities"]
6106    pub capabilities: MavProtocolCapability,
6107    #[doc = "UID if provided by hardware (see uid2)"]
6108    pub uid: u64,
6109    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6110    pub flight_sw_version: u32,
6111    #[doc = "Middleware version number"]
6112    pub middleware_sw_version: u32,
6113    #[doc = "Operating system version number"]
6114    pub os_sw_version: u32,
6115    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6116    pub board_version: u32,
6117    #[doc = "ID of the board vendor"]
6118    pub vendor_id: u16,
6119    #[doc = "ID of the product"]
6120    pub product_id: u16,
6121    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6122    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6123    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6124    pub flight_custom_version: [u8; 8],
6125    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6126    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6127    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6128    pub middleware_custom_version: [u8; 8],
6129    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6130    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6131    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6132    pub os_custom_version: [u8; 8],
6133    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6134    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6135    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6136    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6137    pub uid2: [u8; 18],
6138}
6139impl AUTOPILOT_VERSION_DATA {
6140    pub const ENCODED_LEN: usize = 78usize;
6141    pub const DEFAULT: Self = Self {
6142        capabilities: MavProtocolCapability::DEFAULT,
6143        uid: 0_u64,
6144        flight_sw_version: 0_u32,
6145        middleware_sw_version: 0_u32,
6146        os_sw_version: 0_u32,
6147        board_version: 0_u32,
6148        vendor_id: 0_u16,
6149        product_id: 0_u16,
6150        flight_custom_version: [0_u8; 8usize],
6151        middleware_custom_version: [0_u8; 8usize],
6152        os_custom_version: [0_u8; 8usize],
6153        uid2: [0_u8; 18usize],
6154    };
6155    #[cfg(feature = "arbitrary")]
6156    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6157        use arbitrary::{Arbitrary, Unstructured};
6158        let mut buf = [0u8; 1024];
6159        rng.fill_bytes(&mut buf);
6160        let mut unstructured = Unstructured::new(&buf);
6161        Self::arbitrary(&mut unstructured).unwrap_or_default()
6162    }
6163}
6164impl Default for AUTOPILOT_VERSION_DATA {
6165    fn default() -> Self {
6166        Self::DEFAULT.clone()
6167    }
6168}
6169impl MessageData for AUTOPILOT_VERSION_DATA {
6170    type Message = MavMessage;
6171    const ID: u32 = 148u32;
6172    const NAME: &'static str = "AUTOPILOT_VERSION";
6173    const EXTRA_CRC: u8 = 178u8;
6174    const ENCODED_LEN: usize = 78usize;
6175    fn deser(
6176        _version: MavlinkVersion,
6177        __input: &[u8],
6178    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6179        let avail_len = __input.len();
6180        let mut payload_buf = [0; Self::ENCODED_LEN];
6181        let mut buf = if avail_len < Self::ENCODED_LEN {
6182            payload_buf[0..avail_len].copy_from_slice(__input);
6183            Bytes::new(&payload_buf)
6184        } else {
6185            Bytes::new(__input)
6186        };
6187        let mut __struct = Self::default();
6188        let tmp = buf.get_u64_le();
6189        __struct.capabilities = MavProtocolCapability::from_bits(
6190            tmp & MavProtocolCapability::all().bits(),
6191        )
6192        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6193            flag_type: "MavProtocolCapability",
6194            value: tmp as u32,
6195        })?;
6196        __struct.uid = buf.get_u64_le();
6197        __struct.flight_sw_version = buf.get_u32_le();
6198        __struct.middleware_sw_version = buf.get_u32_le();
6199        __struct.os_sw_version = buf.get_u32_le();
6200        __struct.board_version = buf.get_u32_le();
6201        __struct.vendor_id = buf.get_u16_le();
6202        __struct.product_id = buf.get_u16_le();
6203        for v in &mut __struct.flight_custom_version {
6204            let val = buf.get_u8();
6205            *v = val;
6206        }
6207        for v in &mut __struct.middleware_custom_version {
6208            let val = buf.get_u8();
6209            *v = val;
6210        }
6211        for v in &mut __struct.os_custom_version {
6212            let val = buf.get_u8();
6213            *v = val;
6214        }
6215        for v in &mut __struct.uid2 {
6216            let val = buf.get_u8();
6217            *v = val;
6218        }
6219        Ok(__struct)
6220    }
6221    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6222        let mut __tmp = BytesMut::new(bytes);
6223        #[allow(clippy::absurd_extreme_comparisons)]
6224        #[allow(unused_comparisons)]
6225        if __tmp.remaining() < Self::ENCODED_LEN {
6226            panic!(
6227                "buffer is too small (need {} bytes, but got {})",
6228                Self::ENCODED_LEN,
6229                __tmp.remaining(),
6230            )
6231        }
6232        __tmp.put_u64_le(self.capabilities.bits());
6233        __tmp.put_u64_le(self.uid);
6234        __tmp.put_u32_le(self.flight_sw_version);
6235        __tmp.put_u32_le(self.middleware_sw_version);
6236        __tmp.put_u32_le(self.os_sw_version);
6237        __tmp.put_u32_le(self.board_version);
6238        __tmp.put_u16_le(self.vendor_id);
6239        __tmp.put_u16_le(self.product_id);
6240        for val in &self.flight_custom_version {
6241            __tmp.put_u8(*val);
6242        }
6243        for val in &self.middleware_custom_version {
6244            __tmp.put_u8(*val);
6245        }
6246        for val in &self.os_custom_version {
6247            __tmp.put_u8(*val);
6248        }
6249        if matches!(version, MavlinkVersion::V2) {
6250            for val in &self.uid2 {
6251                __tmp.put_u8(*val);
6252            }
6253            let len = __tmp.len();
6254            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6255        } else {
6256            __tmp.len()
6257        }
6258    }
6259}
6260#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6261#[doc = ""]
6262#[doc = "ID: 435"]
6263#[derive(Debug, Clone, PartialEq)]
6264#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6265#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6266#[cfg_attr(feature = "ts", derive(TS))]
6267#[cfg_attr(feature = "ts", ts(export))]
6268pub struct AVAILABLE_MODES_DATA {
6269    #[doc = "A bitfield for use for autopilot-specific flags"]
6270    pub custom_mode: u32,
6271    #[doc = "Mode properties."]
6272    pub properties: MavModeProperty,
6273    #[doc = "The total number of available modes for the current vehicle type."]
6274    pub number_modes: u8,
6275    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6276    pub mode_index: u8,
6277    #[doc = "Standard mode."]
6278    pub standard_mode: MavStandardMode,
6279    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6280    #[cfg_attr(feature = "ts", ts(type = "string"))]
6281    pub mode_name: CharArray<35>,
6282}
6283impl AVAILABLE_MODES_DATA {
6284    pub const ENCODED_LEN: usize = 46usize;
6285    pub const DEFAULT: Self = Self {
6286        custom_mode: 0_u32,
6287        properties: MavModeProperty::DEFAULT,
6288        number_modes: 0_u8,
6289        mode_index: 0_u8,
6290        standard_mode: MavStandardMode::DEFAULT,
6291        mode_name: CharArray::new([0_u8; 35usize]),
6292    };
6293    #[cfg(feature = "arbitrary")]
6294    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6295        use arbitrary::{Arbitrary, Unstructured};
6296        let mut buf = [0u8; 1024];
6297        rng.fill_bytes(&mut buf);
6298        let mut unstructured = Unstructured::new(&buf);
6299        Self::arbitrary(&mut unstructured).unwrap_or_default()
6300    }
6301}
6302impl Default for AVAILABLE_MODES_DATA {
6303    fn default() -> Self {
6304        Self::DEFAULT.clone()
6305    }
6306}
6307impl MessageData for AVAILABLE_MODES_DATA {
6308    type Message = MavMessage;
6309    const ID: u32 = 435u32;
6310    const NAME: &'static str = "AVAILABLE_MODES";
6311    const EXTRA_CRC: u8 = 134u8;
6312    const ENCODED_LEN: usize = 46usize;
6313    fn deser(
6314        _version: MavlinkVersion,
6315        __input: &[u8],
6316    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6317        let avail_len = __input.len();
6318        let mut payload_buf = [0; Self::ENCODED_LEN];
6319        let mut buf = if avail_len < Self::ENCODED_LEN {
6320            payload_buf[0..avail_len].copy_from_slice(__input);
6321            Bytes::new(&payload_buf)
6322        } else {
6323            Bytes::new(__input)
6324        };
6325        let mut __struct = Self::default();
6326        __struct.custom_mode = buf.get_u32_le();
6327        let tmp = buf.get_u32_le();
6328        __struct.properties = MavModeProperty::from_bits(tmp & MavModeProperty::all().bits())
6329            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6330                flag_type: "MavModeProperty",
6331                value: tmp as u32,
6332            })?;
6333        __struct.number_modes = buf.get_u8();
6334        __struct.mode_index = buf.get_u8();
6335        let tmp = buf.get_u8();
6336        __struct.standard_mode =
6337            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6338                enum_type: "MavStandardMode",
6339                value: tmp as u32,
6340            })?;
6341        let mut tmp = [0_u8; 35usize];
6342        for v in &mut tmp {
6343            *v = buf.get_u8();
6344        }
6345        __struct.mode_name = CharArray::new(tmp);
6346        Ok(__struct)
6347    }
6348    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6349        let mut __tmp = BytesMut::new(bytes);
6350        #[allow(clippy::absurd_extreme_comparisons)]
6351        #[allow(unused_comparisons)]
6352        if __tmp.remaining() < Self::ENCODED_LEN {
6353            panic!(
6354                "buffer is too small (need {} bytes, but got {})",
6355                Self::ENCODED_LEN,
6356                __tmp.remaining(),
6357            )
6358        }
6359        __tmp.put_u32_le(self.custom_mode);
6360        __tmp.put_u32_le(self.properties.bits());
6361        __tmp.put_u8(self.number_modes);
6362        __tmp.put_u8(self.mode_index);
6363        __tmp.put_u8(self.standard_mode as u8);
6364        for val in &self.mode_name {
6365            __tmp.put_u8(*val);
6366        }
6367        if matches!(version, MavlinkVersion::V2) {
6368            let len = __tmp.len();
6369            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6370        } else {
6371            __tmp.len()
6372        }
6373    }
6374}
6375#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6376#[doc = ""]
6377#[doc = "ID: 437"]
6378#[derive(Debug, Clone, PartialEq)]
6379#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6380#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6381#[cfg_attr(feature = "ts", derive(TS))]
6382#[cfg_attr(feature = "ts", ts(export))]
6383pub struct AVAILABLE_MODES_MONITOR_DATA {
6384    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6385    pub seq: u8,
6386}
6387impl AVAILABLE_MODES_MONITOR_DATA {
6388    pub const ENCODED_LEN: usize = 1usize;
6389    pub const DEFAULT: Self = Self { seq: 0_u8 };
6390    #[cfg(feature = "arbitrary")]
6391    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6392        use arbitrary::{Arbitrary, Unstructured};
6393        let mut buf = [0u8; 1024];
6394        rng.fill_bytes(&mut buf);
6395        let mut unstructured = Unstructured::new(&buf);
6396        Self::arbitrary(&mut unstructured).unwrap_or_default()
6397    }
6398}
6399impl Default for AVAILABLE_MODES_MONITOR_DATA {
6400    fn default() -> Self {
6401        Self::DEFAULT.clone()
6402    }
6403}
6404impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6405    type Message = MavMessage;
6406    const ID: u32 = 437u32;
6407    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6408    const EXTRA_CRC: u8 = 30u8;
6409    const ENCODED_LEN: usize = 1usize;
6410    fn deser(
6411        _version: MavlinkVersion,
6412        __input: &[u8],
6413    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6414        let avail_len = __input.len();
6415        let mut payload_buf = [0; Self::ENCODED_LEN];
6416        let mut buf = if avail_len < Self::ENCODED_LEN {
6417            payload_buf[0..avail_len].copy_from_slice(__input);
6418            Bytes::new(&payload_buf)
6419        } else {
6420            Bytes::new(__input)
6421        };
6422        let mut __struct = Self::default();
6423        __struct.seq = buf.get_u8();
6424        Ok(__struct)
6425    }
6426    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6427        let mut __tmp = BytesMut::new(bytes);
6428        #[allow(clippy::absurd_extreme_comparisons)]
6429        #[allow(unused_comparisons)]
6430        if __tmp.remaining() < Self::ENCODED_LEN {
6431            panic!(
6432                "buffer is too small (need {} bytes, but got {})",
6433                Self::ENCODED_LEN,
6434                __tmp.remaining(),
6435            )
6436        }
6437        __tmp.put_u8(self.seq);
6438        if matches!(version, MavlinkVersion::V2) {
6439            let len = __tmp.len();
6440            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6441        } else {
6442            __tmp.len()
6443        }
6444    }
6445}
6446#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6447#[doc = ""]
6448#[doc = "ID: 372"]
6449#[derive(Debug, Clone, PartialEq)]
6450#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6451#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6452#[cfg_attr(feature = "ts", derive(TS))]
6453#[cfg_attr(feature = "ts", ts(export))]
6454pub struct BATTERY_INFO_DATA {
6455    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6456    pub discharge_minimum_voltage: f32,
6457    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6458    pub charging_minimum_voltage: f32,
6459    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6460    pub resting_minimum_voltage: f32,
6461    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6462    pub charging_maximum_voltage: f32,
6463    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6464    pub charging_maximum_current: f32,
6465    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6466    pub nominal_voltage: f32,
6467    #[doc = "Maximum pack discharge current. 0: field not provided."]
6468    pub discharge_maximum_current: f32,
6469    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6470    pub discharge_maximum_burst_current: f32,
6471    #[doc = "Fully charged design capacity. 0: field not provided."]
6472    pub design_capacity: f32,
6473    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6474    pub full_charge_capacity: f32,
6475    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6476    pub cycle_count: u16,
6477    #[doc = "Battery weight. 0: field not provided."]
6478    pub weight: u16,
6479    #[doc = "Battery ID"]
6480    pub id: u8,
6481    #[doc = "Function of the battery."]
6482    pub battery_function: MavBatteryFunction,
6483    #[doc = "Type (chemistry) of the battery."]
6484    pub mavtype: MavBatteryType,
6485    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6486    pub state_of_health: u8,
6487    #[doc = "Number of battery cells in series. 0: field not provided."]
6488    pub cells_in_series: u8,
6489    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6490    #[cfg_attr(feature = "ts", ts(type = "string"))]
6491    pub manufacture_date: CharArray<9>,
6492    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6493    #[cfg_attr(feature = "ts", ts(type = "string"))]
6494    pub serial_number: CharArray<32>,
6495    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
6496    #[cfg_attr(feature = "ts", ts(type = "string"))]
6497    pub name: CharArray<50>,
6498}
6499impl BATTERY_INFO_DATA {
6500    pub const ENCODED_LEN: usize = 140usize;
6501    pub const DEFAULT: Self = Self {
6502        discharge_minimum_voltage: 0.0_f32,
6503        charging_minimum_voltage: 0.0_f32,
6504        resting_minimum_voltage: 0.0_f32,
6505        charging_maximum_voltage: 0.0_f32,
6506        charging_maximum_current: 0.0_f32,
6507        nominal_voltage: 0.0_f32,
6508        discharge_maximum_current: 0.0_f32,
6509        discharge_maximum_burst_current: 0.0_f32,
6510        design_capacity: 0.0_f32,
6511        full_charge_capacity: 0.0_f32,
6512        cycle_count: 0_u16,
6513        weight: 0_u16,
6514        id: 0_u8,
6515        battery_function: MavBatteryFunction::DEFAULT,
6516        mavtype: MavBatteryType::DEFAULT,
6517        state_of_health: 0_u8,
6518        cells_in_series: 0_u8,
6519        manufacture_date: CharArray::new([0_u8; 9usize]),
6520        serial_number: CharArray::new([0_u8; 32usize]),
6521        name: CharArray::new([0_u8; 50usize]),
6522    };
6523    #[cfg(feature = "arbitrary")]
6524    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6525        use arbitrary::{Arbitrary, Unstructured};
6526        let mut buf = [0u8; 1024];
6527        rng.fill_bytes(&mut buf);
6528        let mut unstructured = Unstructured::new(&buf);
6529        Self::arbitrary(&mut unstructured).unwrap_or_default()
6530    }
6531}
6532impl Default for BATTERY_INFO_DATA {
6533    fn default() -> Self {
6534        Self::DEFAULT.clone()
6535    }
6536}
6537impl MessageData for BATTERY_INFO_DATA {
6538    type Message = MavMessage;
6539    const ID: u32 = 372u32;
6540    const NAME: &'static str = "BATTERY_INFO";
6541    const EXTRA_CRC: u8 = 26u8;
6542    const ENCODED_LEN: usize = 140usize;
6543    fn deser(
6544        _version: MavlinkVersion,
6545        __input: &[u8],
6546    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6547        let avail_len = __input.len();
6548        let mut payload_buf = [0; Self::ENCODED_LEN];
6549        let mut buf = if avail_len < Self::ENCODED_LEN {
6550            payload_buf[0..avail_len].copy_from_slice(__input);
6551            Bytes::new(&payload_buf)
6552        } else {
6553            Bytes::new(__input)
6554        };
6555        let mut __struct = Self::default();
6556        __struct.discharge_minimum_voltage = buf.get_f32_le();
6557        __struct.charging_minimum_voltage = buf.get_f32_le();
6558        __struct.resting_minimum_voltage = buf.get_f32_le();
6559        __struct.charging_maximum_voltage = buf.get_f32_le();
6560        __struct.charging_maximum_current = buf.get_f32_le();
6561        __struct.nominal_voltage = buf.get_f32_le();
6562        __struct.discharge_maximum_current = buf.get_f32_le();
6563        __struct.discharge_maximum_burst_current = buf.get_f32_le();
6564        __struct.design_capacity = buf.get_f32_le();
6565        __struct.full_charge_capacity = buf.get_f32_le();
6566        __struct.cycle_count = buf.get_u16_le();
6567        __struct.weight = buf.get_u16_le();
6568        __struct.id = buf.get_u8();
6569        let tmp = buf.get_u8();
6570        __struct.battery_function =
6571            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6572                enum_type: "MavBatteryFunction",
6573                value: tmp as u32,
6574            })?;
6575        let tmp = buf.get_u8();
6576        __struct.mavtype =
6577            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6578                enum_type: "MavBatteryType",
6579                value: tmp as u32,
6580            })?;
6581        __struct.state_of_health = buf.get_u8();
6582        __struct.cells_in_series = buf.get_u8();
6583        let mut tmp = [0_u8; 9usize];
6584        for v in &mut tmp {
6585            *v = buf.get_u8();
6586        }
6587        __struct.manufacture_date = CharArray::new(tmp);
6588        let mut tmp = [0_u8; 32usize];
6589        for v in &mut tmp {
6590            *v = buf.get_u8();
6591        }
6592        __struct.serial_number = CharArray::new(tmp);
6593        let mut tmp = [0_u8; 50usize];
6594        for v in &mut tmp {
6595            *v = buf.get_u8();
6596        }
6597        __struct.name = CharArray::new(tmp);
6598        Ok(__struct)
6599    }
6600    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6601        let mut __tmp = BytesMut::new(bytes);
6602        #[allow(clippy::absurd_extreme_comparisons)]
6603        #[allow(unused_comparisons)]
6604        if __tmp.remaining() < Self::ENCODED_LEN {
6605            panic!(
6606                "buffer is too small (need {} bytes, but got {})",
6607                Self::ENCODED_LEN,
6608                __tmp.remaining(),
6609            )
6610        }
6611        __tmp.put_f32_le(self.discharge_minimum_voltage);
6612        __tmp.put_f32_le(self.charging_minimum_voltage);
6613        __tmp.put_f32_le(self.resting_minimum_voltage);
6614        __tmp.put_f32_le(self.charging_maximum_voltage);
6615        __tmp.put_f32_le(self.charging_maximum_current);
6616        __tmp.put_f32_le(self.nominal_voltage);
6617        __tmp.put_f32_le(self.discharge_maximum_current);
6618        __tmp.put_f32_le(self.discharge_maximum_burst_current);
6619        __tmp.put_f32_le(self.design_capacity);
6620        __tmp.put_f32_le(self.full_charge_capacity);
6621        __tmp.put_u16_le(self.cycle_count);
6622        __tmp.put_u16_le(self.weight);
6623        __tmp.put_u8(self.id);
6624        __tmp.put_u8(self.battery_function as u8);
6625        __tmp.put_u8(self.mavtype as u8);
6626        __tmp.put_u8(self.state_of_health);
6627        __tmp.put_u8(self.cells_in_series);
6628        for val in &self.manufacture_date {
6629            __tmp.put_u8(*val);
6630        }
6631        for val in &self.serial_number {
6632            __tmp.put_u8(*val);
6633        }
6634        for val in &self.name {
6635            __tmp.put_u8(*val);
6636        }
6637        if matches!(version, MavlinkVersion::V2) {
6638            let len = __tmp.len();
6639            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6640        } else {
6641            __tmp.len()
6642        }
6643    }
6644}
6645#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
6646#[doc = ""]
6647#[doc = "ID: 147"]
6648#[derive(Debug, Clone, PartialEq)]
6649#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6650#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6651#[cfg_attr(feature = "ts", derive(TS))]
6652#[cfg_attr(feature = "ts", ts(export))]
6653pub struct BATTERY_STATUS_DATA {
6654    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
6655    pub current_consumed: i32,
6656    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
6657    pub energy_consumed: i32,
6658    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
6659    pub temperature: i16,
6660    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
6661    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6662    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6663    pub voltages: [u16; 10],
6664    #[doc = "Battery current, -1: autopilot does not measure the current"]
6665    pub current_battery: i16,
6666    #[doc = "Battery ID"]
6667    pub id: u8,
6668    #[doc = "Function of the battery"]
6669    pub battery_function: MavBatteryFunction,
6670    #[doc = "Type (chemistry) of the battery"]
6671    pub mavtype: MavBatteryType,
6672    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
6673    pub battery_remaining: i8,
6674    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
6675    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6676    pub time_remaining: i32,
6677    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
6678    #[cfg_attr(feature = "serde", serde(default))]
6679    pub charge_state: MavBatteryChargeState,
6680    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
6681    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6682    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6683    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6684    pub voltages_ext: [u16; 4],
6685    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
6686    #[cfg_attr(feature = "serde", serde(default))]
6687    pub mode: MavBatteryMode,
6688    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
6689    #[cfg_attr(feature = "serde", serde(default))]
6690    pub fault_bitmask: MavBatteryFault,
6691}
6692impl BATTERY_STATUS_DATA {
6693    pub const ENCODED_LEN: usize = 54usize;
6694    pub const DEFAULT: Self = Self {
6695        current_consumed: 0_i32,
6696        energy_consumed: 0_i32,
6697        temperature: 0_i16,
6698        voltages: [0_u16; 10usize],
6699        current_battery: 0_i16,
6700        id: 0_u8,
6701        battery_function: MavBatteryFunction::DEFAULT,
6702        mavtype: MavBatteryType::DEFAULT,
6703        battery_remaining: 0_i8,
6704        time_remaining: 0_i32,
6705        charge_state: MavBatteryChargeState::DEFAULT,
6706        voltages_ext: [0_u16; 4usize],
6707        mode: MavBatteryMode::DEFAULT,
6708        fault_bitmask: MavBatteryFault::DEFAULT,
6709    };
6710    #[cfg(feature = "arbitrary")]
6711    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6712        use arbitrary::{Arbitrary, Unstructured};
6713        let mut buf = [0u8; 1024];
6714        rng.fill_bytes(&mut buf);
6715        let mut unstructured = Unstructured::new(&buf);
6716        Self::arbitrary(&mut unstructured).unwrap_or_default()
6717    }
6718}
6719impl Default for BATTERY_STATUS_DATA {
6720    fn default() -> Self {
6721        Self::DEFAULT.clone()
6722    }
6723}
6724impl MessageData for BATTERY_STATUS_DATA {
6725    type Message = MavMessage;
6726    const ID: u32 = 147u32;
6727    const NAME: &'static str = "BATTERY_STATUS";
6728    const EXTRA_CRC: u8 = 154u8;
6729    const ENCODED_LEN: usize = 54usize;
6730    fn deser(
6731        _version: MavlinkVersion,
6732        __input: &[u8],
6733    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6734        let avail_len = __input.len();
6735        let mut payload_buf = [0; Self::ENCODED_LEN];
6736        let mut buf = if avail_len < Self::ENCODED_LEN {
6737            payload_buf[0..avail_len].copy_from_slice(__input);
6738            Bytes::new(&payload_buf)
6739        } else {
6740            Bytes::new(__input)
6741        };
6742        let mut __struct = Self::default();
6743        __struct.current_consumed = buf.get_i32_le();
6744        __struct.energy_consumed = buf.get_i32_le();
6745        __struct.temperature = buf.get_i16_le();
6746        for v in &mut __struct.voltages {
6747            let val = buf.get_u16_le();
6748            *v = val;
6749        }
6750        __struct.current_battery = buf.get_i16_le();
6751        __struct.id = buf.get_u8();
6752        let tmp = buf.get_u8();
6753        __struct.battery_function =
6754            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6755                enum_type: "MavBatteryFunction",
6756                value: tmp as u32,
6757            })?;
6758        let tmp = buf.get_u8();
6759        __struct.mavtype =
6760            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6761                enum_type: "MavBatteryType",
6762                value: tmp as u32,
6763            })?;
6764        __struct.battery_remaining = buf.get_i8();
6765        __struct.time_remaining = buf.get_i32_le();
6766        let tmp = buf.get_u8();
6767        __struct.charge_state =
6768            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6769                enum_type: "MavBatteryChargeState",
6770                value: tmp as u32,
6771            })?;
6772        for v in &mut __struct.voltages_ext {
6773            let val = buf.get_u16_le();
6774            *v = val;
6775        }
6776        let tmp = buf.get_u8();
6777        __struct.mode =
6778            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6779                enum_type: "MavBatteryMode",
6780                value: tmp as u32,
6781            })?;
6782        let tmp = buf.get_u32_le();
6783        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp & MavBatteryFault::all().bits())
6784            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6785                flag_type: "MavBatteryFault",
6786                value: tmp as u32,
6787            })?;
6788        Ok(__struct)
6789    }
6790    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6791        let mut __tmp = BytesMut::new(bytes);
6792        #[allow(clippy::absurd_extreme_comparisons)]
6793        #[allow(unused_comparisons)]
6794        if __tmp.remaining() < Self::ENCODED_LEN {
6795            panic!(
6796                "buffer is too small (need {} bytes, but got {})",
6797                Self::ENCODED_LEN,
6798                __tmp.remaining(),
6799            )
6800        }
6801        __tmp.put_i32_le(self.current_consumed);
6802        __tmp.put_i32_le(self.energy_consumed);
6803        __tmp.put_i16_le(self.temperature);
6804        for val in &self.voltages {
6805            __tmp.put_u16_le(*val);
6806        }
6807        __tmp.put_i16_le(self.current_battery);
6808        __tmp.put_u8(self.id);
6809        __tmp.put_u8(self.battery_function as u8);
6810        __tmp.put_u8(self.mavtype as u8);
6811        __tmp.put_i8(self.battery_remaining);
6812        if matches!(version, MavlinkVersion::V2) {
6813            __tmp.put_i32_le(self.time_remaining);
6814            __tmp.put_u8(self.charge_state as u8);
6815            for val in &self.voltages_ext {
6816                __tmp.put_u16_le(*val);
6817            }
6818            __tmp.put_u8(self.mode as u8);
6819            __tmp.put_u32_le(self.fault_bitmask.bits());
6820            let len = __tmp.len();
6821            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6822        } else {
6823            __tmp.len()
6824        }
6825    }
6826}
6827#[doc = "Report button state change."]
6828#[doc = ""]
6829#[doc = "ID: 257"]
6830#[derive(Debug, Clone, PartialEq)]
6831#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6832#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6833#[cfg_attr(feature = "ts", derive(TS))]
6834#[cfg_attr(feature = "ts", ts(export))]
6835pub struct BUTTON_CHANGE_DATA {
6836    #[doc = "Timestamp (time since system boot)."]
6837    pub time_boot_ms: u32,
6838    #[doc = "Time of last change of button state."]
6839    pub last_change_ms: u32,
6840    #[doc = "Bitmap for state of buttons."]
6841    pub state: u8,
6842}
6843impl BUTTON_CHANGE_DATA {
6844    pub const ENCODED_LEN: usize = 9usize;
6845    pub const DEFAULT: Self = Self {
6846        time_boot_ms: 0_u32,
6847        last_change_ms: 0_u32,
6848        state: 0_u8,
6849    };
6850    #[cfg(feature = "arbitrary")]
6851    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6852        use arbitrary::{Arbitrary, Unstructured};
6853        let mut buf = [0u8; 1024];
6854        rng.fill_bytes(&mut buf);
6855        let mut unstructured = Unstructured::new(&buf);
6856        Self::arbitrary(&mut unstructured).unwrap_or_default()
6857    }
6858}
6859impl Default for BUTTON_CHANGE_DATA {
6860    fn default() -> Self {
6861        Self::DEFAULT.clone()
6862    }
6863}
6864impl MessageData for BUTTON_CHANGE_DATA {
6865    type Message = MavMessage;
6866    const ID: u32 = 257u32;
6867    const NAME: &'static str = "BUTTON_CHANGE";
6868    const EXTRA_CRC: u8 = 131u8;
6869    const ENCODED_LEN: usize = 9usize;
6870    fn deser(
6871        _version: MavlinkVersion,
6872        __input: &[u8],
6873    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6874        let avail_len = __input.len();
6875        let mut payload_buf = [0; Self::ENCODED_LEN];
6876        let mut buf = if avail_len < Self::ENCODED_LEN {
6877            payload_buf[0..avail_len].copy_from_slice(__input);
6878            Bytes::new(&payload_buf)
6879        } else {
6880            Bytes::new(__input)
6881        };
6882        let mut __struct = Self::default();
6883        __struct.time_boot_ms = buf.get_u32_le();
6884        __struct.last_change_ms = buf.get_u32_le();
6885        __struct.state = buf.get_u8();
6886        Ok(__struct)
6887    }
6888    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6889        let mut __tmp = BytesMut::new(bytes);
6890        #[allow(clippy::absurd_extreme_comparisons)]
6891        #[allow(unused_comparisons)]
6892        if __tmp.remaining() < Self::ENCODED_LEN {
6893            panic!(
6894                "buffer is too small (need {} bytes, but got {})",
6895                Self::ENCODED_LEN,
6896                __tmp.remaining(),
6897            )
6898        }
6899        __tmp.put_u32_le(self.time_boot_ms);
6900        __tmp.put_u32_le(self.last_change_ms);
6901        __tmp.put_u8(self.state);
6902        if matches!(version, MavlinkVersion::V2) {
6903            let len = __tmp.len();
6904            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6905        } else {
6906            __tmp.len()
6907        }
6908    }
6909}
6910#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
6911#[doc = ""]
6912#[doc = "ID: 262"]
6913#[derive(Debug, Clone, PartialEq)]
6914#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6916#[cfg_attr(feature = "ts", derive(TS))]
6917#[cfg_attr(feature = "ts", ts(export))]
6918pub struct CAMERA_CAPTURE_STATUS_DATA {
6919    #[doc = "Timestamp (time since system boot)."]
6920    pub time_boot_ms: u32,
6921    #[doc = "Image capture interval"]
6922    pub image_interval: f32,
6923    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
6924    pub recording_time_ms: u32,
6925    #[doc = "Available storage capacity."]
6926    pub available_capacity: f32,
6927    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
6928    pub image_status: u8,
6929    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
6930    pub video_status: u8,
6931    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
6932    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6933    pub image_count: i32,
6934    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
6935    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6936    pub camera_device_id: u8,
6937}
6938impl CAMERA_CAPTURE_STATUS_DATA {
6939    pub const ENCODED_LEN: usize = 23usize;
6940    pub const DEFAULT: Self = Self {
6941        time_boot_ms: 0_u32,
6942        image_interval: 0.0_f32,
6943        recording_time_ms: 0_u32,
6944        available_capacity: 0.0_f32,
6945        image_status: 0_u8,
6946        video_status: 0_u8,
6947        image_count: 0_i32,
6948        camera_device_id: 0_u8,
6949    };
6950    #[cfg(feature = "arbitrary")]
6951    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6952        use arbitrary::{Arbitrary, Unstructured};
6953        let mut buf = [0u8; 1024];
6954        rng.fill_bytes(&mut buf);
6955        let mut unstructured = Unstructured::new(&buf);
6956        Self::arbitrary(&mut unstructured).unwrap_or_default()
6957    }
6958}
6959impl Default for CAMERA_CAPTURE_STATUS_DATA {
6960    fn default() -> Self {
6961        Self::DEFAULT.clone()
6962    }
6963}
6964impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
6965    type Message = MavMessage;
6966    const ID: u32 = 262u32;
6967    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
6968    const EXTRA_CRC: u8 = 12u8;
6969    const ENCODED_LEN: usize = 23usize;
6970    fn deser(
6971        _version: MavlinkVersion,
6972        __input: &[u8],
6973    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6974        let avail_len = __input.len();
6975        let mut payload_buf = [0; Self::ENCODED_LEN];
6976        let mut buf = if avail_len < Self::ENCODED_LEN {
6977            payload_buf[0..avail_len].copy_from_slice(__input);
6978            Bytes::new(&payload_buf)
6979        } else {
6980            Bytes::new(__input)
6981        };
6982        let mut __struct = Self::default();
6983        __struct.time_boot_ms = buf.get_u32_le();
6984        __struct.image_interval = buf.get_f32_le();
6985        __struct.recording_time_ms = buf.get_u32_le();
6986        __struct.available_capacity = buf.get_f32_le();
6987        __struct.image_status = buf.get_u8();
6988        __struct.video_status = buf.get_u8();
6989        __struct.image_count = buf.get_i32_le();
6990        __struct.camera_device_id = buf.get_u8();
6991        Ok(__struct)
6992    }
6993    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6994        let mut __tmp = BytesMut::new(bytes);
6995        #[allow(clippy::absurd_extreme_comparisons)]
6996        #[allow(unused_comparisons)]
6997        if __tmp.remaining() < Self::ENCODED_LEN {
6998            panic!(
6999                "buffer is too small (need {} bytes, but got {})",
7000                Self::ENCODED_LEN,
7001                __tmp.remaining(),
7002            )
7003        }
7004        __tmp.put_u32_le(self.time_boot_ms);
7005        __tmp.put_f32_le(self.image_interval);
7006        __tmp.put_u32_le(self.recording_time_ms);
7007        __tmp.put_f32_le(self.available_capacity);
7008        __tmp.put_u8(self.image_status);
7009        __tmp.put_u8(self.video_status);
7010        if matches!(version, MavlinkVersion::V2) {
7011            __tmp.put_i32_le(self.image_count);
7012            __tmp.put_u8(self.camera_device_id);
7013            let len = __tmp.len();
7014            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7015        } else {
7016            __tmp.len()
7017        }
7018    }
7019}
7020#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7021#[doc = ""]
7022#[doc = "ID: 271"]
7023#[derive(Debug, Clone, PartialEq)]
7024#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7025#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7026#[cfg_attr(feature = "ts", derive(TS))]
7027#[cfg_attr(feature = "ts", ts(export))]
7028pub struct CAMERA_FOV_STATUS_DATA {
7029    #[doc = "Timestamp (time since system boot)."]
7030    pub time_boot_ms: u32,
7031    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7032    pub lat_camera: i32,
7033    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7034    pub lon_camera: i32,
7035    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7036    pub alt_camera: i32,
7037    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7038    pub lat_image: i32,
7039    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7040    pub lon_image: i32,
7041    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7042    pub alt_image: i32,
7043    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7044    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7045    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7046    pub q: [f32; 4],
7047    #[doc = "Horizontal field of view (NaN if unknown)."]
7048    pub hfov: f32,
7049    #[doc = "Vertical field of view (NaN if unknown)."]
7050    pub vfov: f32,
7051    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7052    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7053    pub camera_device_id: u8,
7054}
7055impl CAMERA_FOV_STATUS_DATA {
7056    pub const ENCODED_LEN: usize = 53usize;
7057    pub const DEFAULT: Self = Self {
7058        time_boot_ms: 0_u32,
7059        lat_camera: 0_i32,
7060        lon_camera: 0_i32,
7061        alt_camera: 0_i32,
7062        lat_image: 0_i32,
7063        lon_image: 0_i32,
7064        alt_image: 0_i32,
7065        q: [0.0_f32; 4usize],
7066        hfov: 0.0_f32,
7067        vfov: 0.0_f32,
7068        camera_device_id: 0_u8,
7069    };
7070    #[cfg(feature = "arbitrary")]
7071    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7072        use arbitrary::{Arbitrary, Unstructured};
7073        let mut buf = [0u8; 1024];
7074        rng.fill_bytes(&mut buf);
7075        let mut unstructured = Unstructured::new(&buf);
7076        Self::arbitrary(&mut unstructured).unwrap_or_default()
7077    }
7078}
7079impl Default for CAMERA_FOV_STATUS_DATA {
7080    fn default() -> Self {
7081        Self::DEFAULT.clone()
7082    }
7083}
7084impl MessageData for CAMERA_FOV_STATUS_DATA {
7085    type Message = MavMessage;
7086    const ID: u32 = 271u32;
7087    const NAME: &'static str = "CAMERA_FOV_STATUS";
7088    const EXTRA_CRC: u8 = 22u8;
7089    const ENCODED_LEN: usize = 53usize;
7090    fn deser(
7091        _version: MavlinkVersion,
7092        __input: &[u8],
7093    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7094        let avail_len = __input.len();
7095        let mut payload_buf = [0; Self::ENCODED_LEN];
7096        let mut buf = if avail_len < Self::ENCODED_LEN {
7097            payload_buf[0..avail_len].copy_from_slice(__input);
7098            Bytes::new(&payload_buf)
7099        } else {
7100            Bytes::new(__input)
7101        };
7102        let mut __struct = Self::default();
7103        __struct.time_boot_ms = buf.get_u32_le();
7104        __struct.lat_camera = buf.get_i32_le();
7105        __struct.lon_camera = buf.get_i32_le();
7106        __struct.alt_camera = buf.get_i32_le();
7107        __struct.lat_image = buf.get_i32_le();
7108        __struct.lon_image = buf.get_i32_le();
7109        __struct.alt_image = buf.get_i32_le();
7110        for v in &mut __struct.q {
7111            let val = buf.get_f32_le();
7112            *v = val;
7113        }
7114        __struct.hfov = buf.get_f32_le();
7115        __struct.vfov = buf.get_f32_le();
7116        __struct.camera_device_id = buf.get_u8();
7117        Ok(__struct)
7118    }
7119    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7120        let mut __tmp = BytesMut::new(bytes);
7121        #[allow(clippy::absurd_extreme_comparisons)]
7122        #[allow(unused_comparisons)]
7123        if __tmp.remaining() < Self::ENCODED_LEN {
7124            panic!(
7125                "buffer is too small (need {} bytes, but got {})",
7126                Self::ENCODED_LEN,
7127                __tmp.remaining(),
7128            )
7129        }
7130        __tmp.put_u32_le(self.time_boot_ms);
7131        __tmp.put_i32_le(self.lat_camera);
7132        __tmp.put_i32_le(self.lon_camera);
7133        __tmp.put_i32_le(self.alt_camera);
7134        __tmp.put_i32_le(self.lat_image);
7135        __tmp.put_i32_le(self.lon_image);
7136        __tmp.put_i32_le(self.alt_image);
7137        for val in &self.q {
7138            __tmp.put_f32_le(*val);
7139        }
7140        __tmp.put_f32_le(self.hfov);
7141        __tmp.put_f32_le(self.vfov);
7142        if matches!(version, MavlinkVersion::V2) {
7143            __tmp.put_u8(self.camera_device_id);
7144            let len = __tmp.len();
7145            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7146        } else {
7147            __tmp.len()
7148        }
7149    }
7150}
7151#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7152#[doc = ""]
7153#[doc = "ID: 263"]
7154#[derive(Debug, Clone, PartialEq)]
7155#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7157#[cfg_attr(feature = "ts", derive(TS))]
7158#[cfg_attr(feature = "ts", ts(export))]
7159pub struct CAMERA_IMAGE_CAPTURED_DATA {
7160    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7161    pub time_utc: u64,
7162    #[doc = "Timestamp (time since system boot)."]
7163    pub time_boot_ms: u32,
7164    #[doc = "Latitude where image was taken"]
7165    pub lat: i32,
7166    #[doc = "Longitude where capture was taken"]
7167    pub lon: i32,
7168    #[doc = "Altitude (MSL) where image was taken"]
7169    pub alt: i32,
7170    #[doc = "Altitude above ground"]
7171    pub relative_alt: i32,
7172    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7173    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7174    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7175    pub q: [f32; 4],
7176    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7177    pub image_index: i32,
7178    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7179    pub camera_id: u8,
7180    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7181    pub capture_result: i8,
7182    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7183    #[cfg_attr(feature = "ts", ts(type = "string"))]
7184    pub file_url: CharArray<205>,
7185}
7186impl CAMERA_IMAGE_CAPTURED_DATA {
7187    pub const ENCODED_LEN: usize = 255usize;
7188    pub const DEFAULT: Self = Self {
7189        time_utc: 0_u64,
7190        time_boot_ms: 0_u32,
7191        lat: 0_i32,
7192        lon: 0_i32,
7193        alt: 0_i32,
7194        relative_alt: 0_i32,
7195        q: [0.0_f32; 4usize],
7196        image_index: 0_i32,
7197        camera_id: 0_u8,
7198        capture_result: 0_i8,
7199        file_url: CharArray::new([0_u8; 205usize]),
7200    };
7201    #[cfg(feature = "arbitrary")]
7202    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7203        use arbitrary::{Arbitrary, Unstructured};
7204        let mut buf = [0u8; 1024];
7205        rng.fill_bytes(&mut buf);
7206        let mut unstructured = Unstructured::new(&buf);
7207        Self::arbitrary(&mut unstructured).unwrap_or_default()
7208    }
7209}
7210impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7211    fn default() -> Self {
7212        Self::DEFAULT.clone()
7213    }
7214}
7215impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7216    type Message = MavMessage;
7217    const ID: u32 = 263u32;
7218    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7219    const EXTRA_CRC: u8 = 133u8;
7220    const ENCODED_LEN: usize = 255usize;
7221    fn deser(
7222        _version: MavlinkVersion,
7223        __input: &[u8],
7224    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7225        let avail_len = __input.len();
7226        let mut payload_buf = [0; Self::ENCODED_LEN];
7227        let mut buf = if avail_len < Self::ENCODED_LEN {
7228            payload_buf[0..avail_len].copy_from_slice(__input);
7229            Bytes::new(&payload_buf)
7230        } else {
7231            Bytes::new(__input)
7232        };
7233        let mut __struct = Self::default();
7234        __struct.time_utc = buf.get_u64_le();
7235        __struct.time_boot_ms = buf.get_u32_le();
7236        __struct.lat = buf.get_i32_le();
7237        __struct.lon = buf.get_i32_le();
7238        __struct.alt = buf.get_i32_le();
7239        __struct.relative_alt = buf.get_i32_le();
7240        for v in &mut __struct.q {
7241            let val = buf.get_f32_le();
7242            *v = val;
7243        }
7244        __struct.image_index = buf.get_i32_le();
7245        __struct.camera_id = buf.get_u8();
7246        __struct.capture_result = buf.get_i8();
7247        let mut tmp = [0_u8; 205usize];
7248        for v in &mut tmp {
7249            *v = buf.get_u8();
7250        }
7251        __struct.file_url = CharArray::new(tmp);
7252        Ok(__struct)
7253    }
7254    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7255        let mut __tmp = BytesMut::new(bytes);
7256        #[allow(clippy::absurd_extreme_comparisons)]
7257        #[allow(unused_comparisons)]
7258        if __tmp.remaining() < Self::ENCODED_LEN {
7259            panic!(
7260                "buffer is too small (need {} bytes, but got {})",
7261                Self::ENCODED_LEN,
7262                __tmp.remaining(),
7263            )
7264        }
7265        __tmp.put_u64_le(self.time_utc);
7266        __tmp.put_u32_le(self.time_boot_ms);
7267        __tmp.put_i32_le(self.lat);
7268        __tmp.put_i32_le(self.lon);
7269        __tmp.put_i32_le(self.alt);
7270        __tmp.put_i32_le(self.relative_alt);
7271        for val in &self.q {
7272            __tmp.put_f32_le(*val);
7273        }
7274        __tmp.put_i32_le(self.image_index);
7275        __tmp.put_u8(self.camera_id);
7276        __tmp.put_i8(self.capture_result);
7277        for val in &self.file_url {
7278            __tmp.put_u8(*val);
7279        }
7280        if matches!(version, MavlinkVersion::V2) {
7281            let len = __tmp.len();
7282            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7283        } else {
7284            __tmp.len()
7285        }
7286    }
7287}
7288#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7289#[doc = ""]
7290#[doc = "ID: 259"]
7291#[derive(Debug, Clone, PartialEq)]
7292#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7293#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7294#[cfg_attr(feature = "ts", derive(TS))]
7295#[cfg_attr(feature = "ts", ts(export))]
7296pub struct CAMERA_INFORMATION_DATA {
7297    #[doc = "Timestamp (time since system boot)."]
7298    pub time_boot_ms: u32,
7299    #[doc = "0xff). Use 0 if not known."]
7300    pub firmware_version: u32,
7301    #[doc = "Focal length. Use NaN if not known."]
7302    pub focal_length: f32,
7303    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7304    pub sensor_size_h: f32,
7305    #[doc = "Image sensor size vertical. Use NaN if not known."]
7306    pub sensor_size_v: f32,
7307    #[doc = "Bitmap of camera capability flags."]
7308    pub flags: CameraCapFlags,
7309    #[doc = "Horizontal image resolution. Use 0 if not known."]
7310    pub resolution_h: u16,
7311    #[doc = "Vertical image resolution. Use 0 if not known."]
7312    pub resolution_v: u16,
7313    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7314    pub cam_definition_version: u16,
7315    #[doc = "Name of the camera vendor"]
7316    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7317    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7318    pub vendor_name: [u8; 32],
7319    #[doc = "Name of the camera model"]
7320    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7321    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7322    pub model_name: [u8; 32],
7323    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7324    pub lens_id: u8,
7325    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7326    #[cfg_attr(feature = "ts", ts(type = "string"))]
7327    pub cam_definition_uri: CharArray<140>,
7328    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7329    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7330    pub gimbal_device_id: u8,
7331    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7332    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7333    pub camera_device_id: u8,
7334}
7335impl CAMERA_INFORMATION_DATA {
7336    pub const ENCODED_LEN: usize = 237usize;
7337    pub const DEFAULT: Self = Self {
7338        time_boot_ms: 0_u32,
7339        firmware_version: 0_u32,
7340        focal_length: 0.0_f32,
7341        sensor_size_h: 0.0_f32,
7342        sensor_size_v: 0.0_f32,
7343        flags: CameraCapFlags::DEFAULT,
7344        resolution_h: 0_u16,
7345        resolution_v: 0_u16,
7346        cam_definition_version: 0_u16,
7347        vendor_name: [0_u8; 32usize],
7348        model_name: [0_u8; 32usize],
7349        lens_id: 0_u8,
7350        cam_definition_uri: CharArray::new([0_u8; 140usize]),
7351        gimbal_device_id: 0_u8,
7352        camera_device_id: 0_u8,
7353    };
7354    #[cfg(feature = "arbitrary")]
7355    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7356        use arbitrary::{Arbitrary, Unstructured};
7357        let mut buf = [0u8; 1024];
7358        rng.fill_bytes(&mut buf);
7359        let mut unstructured = Unstructured::new(&buf);
7360        Self::arbitrary(&mut unstructured).unwrap_or_default()
7361    }
7362}
7363impl Default for CAMERA_INFORMATION_DATA {
7364    fn default() -> Self {
7365        Self::DEFAULT.clone()
7366    }
7367}
7368impl MessageData for CAMERA_INFORMATION_DATA {
7369    type Message = MavMessage;
7370    const ID: u32 = 259u32;
7371    const NAME: &'static str = "CAMERA_INFORMATION";
7372    const EXTRA_CRC: u8 = 92u8;
7373    const ENCODED_LEN: usize = 237usize;
7374    fn deser(
7375        _version: MavlinkVersion,
7376        __input: &[u8],
7377    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7378        let avail_len = __input.len();
7379        let mut payload_buf = [0; Self::ENCODED_LEN];
7380        let mut buf = if avail_len < Self::ENCODED_LEN {
7381            payload_buf[0..avail_len].copy_from_slice(__input);
7382            Bytes::new(&payload_buf)
7383        } else {
7384            Bytes::new(__input)
7385        };
7386        let mut __struct = Self::default();
7387        __struct.time_boot_ms = buf.get_u32_le();
7388        __struct.firmware_version = buf.get_u32_le();
7389        __struct.focal_length = buf.get_f32_le();
7390        __struct.sensor_size_h = buf.get_f32_le();
7391        __struct.sensor_size_v = buf.get_f32_le();
7392        let tmp = buf.get_u32_le();
7393        __struct.flags = CameraCapFlags::from_bits(tmp & CameraCapFlags::all().bits()).ok_or(
7394            ::mavlink_core::error::ParserError::InvalidFlag {
7395                flag_type: "CameraCapFlags",
7396                value: tmp as u32,
7397            },
7398        )?;
7399        __struct.resolution_h = buf.get_u16_le();
7400        __struct.resolution_v = buf.get_u16_le();
7401        __struct.cam_definition_version = buf.get_u16_le();
7402        for v in &mut __struct.vendor_name {
7403            let val = buf.get_u8();
7404            *v = val;
7405        }
7406        for v in &mut __struct.model_name {
7407            let val = buf.get_u8();
7408            *v = val;
7409        }
7410        __struct.lens_id = buf.get_u8();
7411        let mut tmp = [0_u8; 140usize];
7412        for v in &mut tmp {
7413            *v = buf.get_u8();
7414        }
7415        __struct.cam_definition_uri = CharArray::new(tmp);
7416        __struct.gimbal_device_id = buf.get_u8();
7417        __struct.camera_device_id = buf.get_u8();
7418        Ok(__struct)
7419    }
7420    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7421        let mut __tmp = BytesMut::new(bytes);
7422        #[allow(clippy::absurd_extreme_comparisons)]
7423        #[allow(unused_comparisons)]
7424        if __tmp.remaining() < Self::ENCODED_LEN {
7425            panic!(
7426                "buffer is too small (need {} bytes, but got {})",
7427                Self::ENCODED_LEN,
7428                __tmp.remaining(),
7429            )
7430        }
7431        __tmp.put_u32_le(self.time_boot_ms);
7432        __tmp.put_u32_le(self.firmware_version);
7433        __tmp.put_f32_le(self.focal_length);
7434        __tmp.put_f32_le(self.sensor_size_h);
7435        __tmp.put_f32_le(self.sensor_size_v);
7436        __tmp.put_u32_le(self.flags.bits());
7437        __tmp.put_u16_le(self.resolution_h);
7438        __tmp.put_u16_le(self.resolution_v);
7439        __tmp.put_u16_le(self.cam_definition_version);
7440        for val in &self.vendor_name {
7441            __tmp.put_u8(*val);
7442        }
7443        for val in &self.model_name {
7444            __tmp.put_u8(*val);
7445        }
7446        __tmp.put_u8(self.lens_id);
7447        for val in &self.cam_definition_uri {
7448            __tmp.put_u8(*val);
7449        }
7450        if matches!(version, MavlinkVersion::V2) {
7451            __tmp.put_u8(self.gimbal_device_id);
7452            __tmp.put_u8(self.camera_device_id);
7453            let len = __tmp.len();
7454            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7455        } else {
7456            __tmp.len()
7457        }
7458    }
7459}
7460#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7461#[doc = ""]
7462#[doc = "ID: 260"]
7463#[derive(Debug, Clone, PartialEq)]
7464#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7465#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7466#[cfg_attr(feature = "ts", derive(TS))]
7467#[cfg_attr(feature = "ts", ts(export))]
7468pub struct CAMERA_SETTINGS_DATA {
7469    #[doc = "Timestamp (time since system boot)."]
7470    pub time_boot_ms: u32,
7471    #[doc = "Camera mode"]
7472    pub mode_id: CameraMode,
7473    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7474    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7475    pub zoomLevel: f32,
7476    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7477    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7478    pub focusLevel: f32,
7479    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7480    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7481    pub camera_device_id: u8,
7482}
7483impl CAMERA_SETTINGS_DATA {
7484    pub const ENCODED_LEN: usize = 14usize;
7485    pub const DEFAULT: Self = Self {
7486        time_boot_ms: 0_u32,
7487        mode_id: CameraMode::DEFAULT,
7488        zoomLevel: 0.0_f32,
7489        focusLevel: 0.0_f32,
7490        camera_device_id: 0_u8,
7491    };
7492    #[cfg(feature = "arbitrary")]
7493    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7494        use arbitrary::{Arbitrary, Unstructured};
7495        let mut buf = [0u8; 1024];
7496        rng.fill_bytes(&mut buf);
7497        let mut unstructured = Unstructured::new(&buf);
7498        Self::arbitrary(&mut unstructured).unwrap_or_default()
7499    }
7500}
7501impl Default for CAMERA_SETTINGS_DATA {
7502    fn default() -> Self {
7503        Self::DEFAULT.clone()
7504    }
7505}
7506impl MessageData for CAMERA_SETTINGS_DATA {
7507    type Message = MavMessage;
7508    const ID: u32 = 260u32;
7509    const NAME: &'static str = "CAMERA_SETTINGS";
7510    const EXTRA_CRC: u8 = 146u8;
7511    const ENCODED_LEN: usize = 14usize;
7512    fn deser(
7513        _version: MavlinkVersion,
7514        __input: &[u8],
7515    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7516        let avail_len = __input.len();
7517        let mut payload_buf = [0; Self::ENCODED_LEN];
7518        let mut buf = if avail_len < Self::ENCODED_LEN {
7519            payload_buf[0..avail_len].copy_from_slice(__input);
7520            Bytes::new(&payload_buf)
7521        } else {
7522            Bytes::new(__input)
7523        };
7524        let mut __struct = Self::default();
7525        __struct.time_boot_ms = buf.get_u32_le();
7526        let tmp = buf.get_u8();
7527        __struct.mode_id =
7528            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7529                enum_type: "CameraMode",
7530                value: tmp as u32,
7531            })?;
7532        __struct.zoomLevel = buf.get_f32_le();
7533        __struct.focusLevel = buf.get_f32_le();
7534        __struct.camera_device_id = buf.get_u8();
7535        Ok(__struct)
7536    }
7537    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7538        let mut __tmp = BytesMut::new(bytes);
7539        #[allow(clippy::absurd_extreme_comparisons)]
7540        #[allow(unused_comparisons)]
7541        if __tmp.remaining() < Self::ENCODED_LEN {
7542            panic!(
7543                "buffer is too small (need {} bytes, but got {})",
7544                Self::ENCODED_LEN,
7545                __tmp.remaining(),
7546            )
7547        }
7548        __tmp.put_u32_le(self.time_boot_ms);
7549        __tmp.put_u8(self.mode_id as u8);
7550        if matches!(version, MavlinkVersion::V2) {
7551            __tmp.put_f32_le(self.zoomLevel);
7552            __tmp.put_f32_le(self.focusLevel);
7553            __tmp.put_u8(self.camera_device_id);
7554            let len = __tmp.len();
7555            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7556        } else {
7557            __tmp.len()
7558        }
7559    }
7560}
7561#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
7562#[doc = ""]
7563#[doc = "ID: 277"]
7564#[derive(Debug, Clone, PartialEq)]
7565#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7566#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7567#[cfg_attr(feature = "ts", derive(TS))]
7568#[cfg_attr(feature = "ts", ts(export))]
7569pub struct CAMERA_THERMAL_RANGE_DATA {
7570    #[doc = "Timestamp (time since system boot)."]
7571    pub time_boot_ms: u32,
7572    #[doc = "Temperature max."]
7573    pub max: f32,
7574    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7575    pub max_point_x: f32,
7576    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7577    pub max_point_y: f32,
7578    #[doc = "Temperature min."]
7579    pub min: f32,
7580    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7581    pub min_point_x: f32,
7582    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7583    pub min_point_y: f32,
7584    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
7585    pub stream_id: u8,
7586    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7587    pub camera_device_id: u8,
7588}
7589impl CAMERA_THERMAL_RANGE_DATA {
7590    pub const ENCODED_LEN: usize = 30usize;
7591    pub const DEFAULT: Self = Self {
7592        time_boot_ms: 0_u32,
7593        max: 0.0_f32,
7594        max_point_x: 0.0_f32,
7595        max_point_y: 0.0_f32,
7596        min: 0.0_f32,
7597        min_point_x: 0.0_f32,
7598        min_point_y: 0.0_f32,
7599        stream_id: 0_u8,
7600        camera_device_id: 0_u8,
7601    };
7602    #[cfg(feature = "arbitrary")]
7603    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7604        use arbitrary::{Arbitrary, Unstructured};
7605        let mut buf = [0u8; 1024];
7606        rng.fill_bytes(&mut buf);
7607        let mut unstructured = Unstructured::new(&buf);
7608        Self::arbitrary(&mut unstructured).unwrap_or_default()
7609    }
7610}
7611impl Default for CAMERA_THERMAL_RANGE_DATA {
7612    fn default() -> Self {
7613        Self::DEFAULT.clone()
7614    }
7615}
7616impl MessageData for CAMERA_THERMAL_RANGE_DATA {
7617    type Message = MavMessage;
7618    const ID: u32 = 277u32;
7619    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
7620    const EXTRA_CRC: u8 = 62u8;
7621    const ENCODED_LEN: usize = 30usize;
7622    fn deser(
7623        _version: MavlinkVersion,
7624        __input: &[u8],
7625    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7626        let avail_len = __input.len();
7627        let mut payload_buf = [0; Self::ENCODED_LEN];
7628        let mut buf = if avail_len < Self::ENCODED_LEN {
7629            payload_buf[0..avail_len].copy_from_slice(__input);
7630            Bytes::new(&payload_buf)
7631        } else {
7632            Bytes::new(__input)
7633        };
7634        let mut __struct = Self::default();
7635        __struct.time_boot_ms = buf.get_u32_le();
7636        __struct.max = buf.get_f32_le();
7637        __struct.max_point_x = buf.get_f32_le();
7638        __struct.max_point_y = buf.get_f32_le();
7639        __struct.min = buf.get_f32_le();
7640        __struct.min_point_x = buf.get_f32_le();
7641        __struct.min_point_y = buf.get_f32_le();
7642        __struct.stream_id = buf.get_u8();
7643        __struct.camera_device_id = buf.get_u8();
7644        Ok(__struct)
7645    }
7646    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7647        let mut __tmp = BytesMut::new(bytes);
7648        #[allow(clippy::absurd_extreme_comparisons)]
7649        #[allow(unused_comparisons)]
7650        if __tmp.remaining() < Self::ENCODED_LEN {
7651            panic!(
7652                "buffer is too small (need {} bytes, but got {})",
7653                Self::ENCODED_LEN,
7654                __tmp.remaining(),
7655            )
7656        }
7657        __tmp.put_u32_le(self.time_boot_ms);
7658        __tmp.put_f32_le(self.max);
7659        __tmp.put_f32_le(self.max_point_x);
7660        __tmp.put_f32_le(self.max_point_y);
7661        __tmp.put_f32_le(self.min);
7662        __tmp.put_f32_le(self.min_point_x);
7663        __tmp.put_f32_le(self.min_point_y);
7664        __tmp.put_u8(self.stream_id);
7665        __tmp.put_u8(self.camera_device_id);
7666        if matches!(version, MavlinkVersion::V2) {
7667            let len = __tmp.len();
7668            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7669        } else {
7670            __tmp.len()
7671        }
7672    }
7673}
7674#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7675#[doc = ""]
7676#[doc = "ID: 276"]
7677#[derive(Debug, Clone, PartialEq)]
7678#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7679#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7680#[cfg_attr(feature = "ts", derive(TS))]
7681#[cfg_attr(feature = "ts", ts(export))]
7682pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
7683    #[doc = "Latitude of tracked object"]
7684    pub lat: i32,
7685    #[doc = "Longitude of tracked object"]
7686    pub lon: i32,
7687    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
7688    pub alt: f32,
7689    #[doc = "Horizontal accuracy. NAN if unknown"]
7690    pub h_acc: f32,
7691    #[doc = "Vertical accuracy. NAN if unknown"]
7692    pub v_acc: f32,
7693    #[doc = "North velocity of tracked object. NAN if unknown"]
7694    pub vel_n: f32,
7695    #[doc = "East velocity of tracked object. NAN if unknown"]
7696    pub vel_e: f32,
7697    #[doc = "Down velocity of tracked object. NAN if unknown"]
7698    pub vel_d: f32,
7699    #[doc = "Velocity accuracy. NAN if unknown"]
7700    pub vel_acc: f32,
7701    #[doc = "Distance between camera and tracked object. NAN if unknown"]
7702    pub dist: f32,
7703    #[doc = "Heading in radians, in NED. NAN if unknown"]
7704    pub hdg: f32,
7705    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
7706    pub hdg_acc: f32,
7707    #[doc = "Current tracking status"]
7708    pub tracking_status: CameraTrackingStatusFlags,
7709    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7710    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7711    pub camera_device_id: u8,
7712}
7713impl CAMERA_TRACKING_GEO_STATUS_DATA {
7714    pub const ENCODED_LEN: usize = 50usize;
7715    pub const DEFAULT: Self = Self {
7716        lat: 0_i32,
7717        lon: 0_i32,
7718        alt: 0.0_f32,
7719        h_acc: 0.0_f32,
7720        v_acc: 0.0_f32,
7721        vel_n: 0.0_f32,
7722        vel_e: 0.0_f32,
7723        vel_d: 0.0_f32,
7724        vel_acc: 0.0_f32,
7725        dist: 0.0_f32,
7726        hdg: 0.0_f32,
7727        hdg_acc: 0.0_f32,
7728        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7729        camera_device_id: 0_u8,
7730    };
7731    #[cfg(feature = "arbitrary")]
7732    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7733        use arbitrary::{Arbitrary, Unstructured};
7734        let mut buf = [0u8; 1024];
7735        rng.fill_bytes(&mut buf);
7736        let mut unstructured = Unstructured::new(&buf);
7737        Self::arbitrary(&mut unstructured).unwrap_or_default()
7738    }
7739}
7740impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
7741    fn default() -> Self {
7742        Self::DEFAULT.clone()
7743    }
7744}
7745impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
7746    type Message = MavMessage;
7747    const ID: u32 = 276u32;
7748    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
7749    const EXTRA_CRC: u8 = 18u8;
7750    const ENCODED_LEN: usize = 50usize;
7751    fn deser(
7752        _version: MavlinkVersion,
7753        __input: &[u8],
7754    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7755        let avail_len = __input.len();
7756        let mut payload_buf = [0; Self::ENCODED_LEN];
7757        let mut buf = if avail_len < Self::ENCODED_LEN {
7758            payload_buf[0..avail_len].copy_from_slice(__input);
7759            Bytes::new(&payload_buf)
7760        } else {
7761            Bytes::new(__input)
7762        };
7763        let mut __struct = Self::default();
7764        __struct.lat = buf.get_i32_le();
7765        __struct.lon = buf.get_i32_le();
7766        __struct.alt = buf.get_f32_le();
7767        __struct.h_acc = buf.get_f32_le();
7768        __struct.v_acc = buf.get_f32_le();
7769        __struct.vel_n = buf.get_f32_le();
7770        __struct.vel_e = buf.get_f32_le();
7771        __struct.vel_d = buf.get_f32_le();
7772        __struct.vel_acc = buf.get_f32_le();
7773        __struct.dist = buf.get_f32_le();
7774        __struct.hdg = buf.get_f32_le();
7775        __struct.hdg_acc = buf.get_f32_le();
7776        let tmp = buf.get_u8();
7777        __struct.tracking_status =
7778            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7779                enum_type: "CameraTrackingStatusFlags",
7780                value: tmp as u32,
7781            })?;
7782        __struct.camera_device_id = buf.get_u8();
7783        Ok(__struct)
7784    }
7785    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7786        let mut __tmp = BytesMut::new(bytes);
7787        #[allow(clippy::absurd_extreme_comparisons)]
7788        #[allow(unused_comparisons)]
7789        if __tmp.remaining() < Self::ENCODED_LEN {
7790            panic!(
7791                "buffer is too small (need {} bytes, but got {})",
7792                Self::ENCODED_LEN,
7793                __tmp.remaining(),
7794            )
7795        }
7796        __tmp.put_i32_le(self.lat);
7797        __tmp.put_i32_le(self.lon);
7798        __tmp.put_f32_le(self.alt);
7799        __tmp.put_f32_le(self.h_acc);
7800        __tmp.put_f32_le(self.v_acc);
7801        __tmp.put_f32_le(self.vel_n);
7802        __tmp.put_f32_le(self.vel_e);
7803        __tmp.put_f32_le(self.vel_d);
7804        __tmp.put_f32_le(self.vel_acc);
7805        __tmp.put_f32_le(self.dist);
7806        __tmp.put_f32_le(self.hdg);
7807        __tmp.put_f32_le(self.hdg_acc);
7808        __tmp.put_u8(self.tracking_status as u8);
7809        if matches!(version, MavlinkVersion::V2) {
7810            __tmp.put_u8(self.camera_device_id);
7811            let len = __tmp.len();
7812            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7813        } else {
7814            __tmp.len()
7815        }
7816    }
7817}
7818#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7819#[doc = ""]
7820#[doc = "ID: 275"]
7821#[derive(Debug, Clone, PartialEq)]
7822#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7823#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7824#[cfg_attr(feature = "ts", derive(TS))]
7825#[cfg_attr(feature = "ts", ts(export))]
7826pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
7827    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7828    pub point_x: f32,
7829    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7830    pub point_y: f32,
7831    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
7832    pub radius: f32,
7833    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7834    pub rec_top_x: f32,
7835    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7836    pub rec_top_y: f32,
7837    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7838    pub rec_bottom_x: f32,
7839    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7840    pub rec_bottom_y: f32,
7841    #[doc = "Current tracking status"]
7842    pub tracking_status: CameraTrackingStatusFlags,
7843    #[doc = "Current tracking mode"]
7844    pub tracking_mode: CameraTrackingMode,
7845    #[doc = "Defines location of target data"]
7846    pub target_data: CameraTrackingTargetData,
7847    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7848    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7849    pub camera_device_id: u8,
7850}
7851impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
7852    pub const ENCODED_LEN: usize = 32usize;
7853    pub const DEFAULT: Self = Self {
7854        point_x: 0.0_f32,
7855        point_y: 0.0_f32,
7856        radius: 0.0_f32,
7857        rec_top_x: 0.0_f32,
7858        rec_top_y: 0.0_f32,
7859        rec_bottom_x: 0.0_f32,
7860        rec_bottom_y: 0.0_f32,
7861        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7862        tracking_mode: CameraTrackingMode::DEFAULT,
7863        target_data: CameraTrackingTargetData::DEFAULT,
7864        camera_device_id: 0_u8,
7865    };
7866    #[cfg(feature = "arbitrary")]
7867    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7868        use arbitrary::{Arbitrary, Unstructured};
7869        let mut buf = [0u8; 1024];
7870        rng.fill_bytes(&mut buf);
7871        let mut unstructured = Unstructured::new(&buf);
7872        Self::arbitrary(&mut unstructured).unwrap_or_default()
7873    }
7874}
7875impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7876    fn default() -> Self {
7877        Self::DEFAULT.clone()
7878    }
7879}
7880impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7881    type Message = MavMessage;
7882    const ID: u32 = 275u32;
7883    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
7884    const EXTRA_CRC: u8 = 126u8;
7885    const ENCODED_LEN: usize = 32usize;
7886    fn deser(
7887        _version: MavlinkVersion,
7888        __input: &[u8],
7889    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7890        let avail_len = __input.len();
7891        let mut payload_buf = [0; Self::ENCODED_LEN];
7892        let mut buf = if avail_len < Self::ENCODED_LEN {
7893            payload_buf[0..avail_len].copy_from_slice(__input);
7894            Bytes::new(&payload_buf)
7895        } else {
7896            Bytes::new(__input)
7897        };
7898        let mut __struct = Self::default();
7899        __struct.point_x = buf.get_f32_le();
7900        __struct.point_y = buf.get_f32_le();
7901        __struct.radius = buf.get_f32_le();
7902        __struct.rec_top_x = buf.get_f32_le();
7903        __struct.rec_top_y = buf.get_f32_le();
7904        __struct.rec_bottom_x = buf.get_f32_le();
7905        __struct.rec_bottom_y = buf.get_f32_le();
7906        let tmp = buf.get_u8();
7907        __struct.tracking_status =
7908            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7909                enum_type: "CameraTrackingStatusFlags",
7910                value: tmp as u32,
7911            })?;
7912        let tmp = buf.get_u8();
7913        __struct.tracking_mode =
7914            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7915                enum_type: "CameraTrackingMode",
7916                value: tmp as u32,
7917            })?;
7918        let tmp = buf.get_u8();
7919        __struct.target_data =
7920            CameraTrackingTargetData::from_bits(tmp & CameraTrackingTargetData::all().bits())
7921                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7922                    flag_type: "CameraTrackingTargetData",
7923                    value: tmp as u32,
7924                })?;
7925        __struct.camera_device_id = buf.get_u8();
7926        Ok(__struct)
7927    }
7928    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7929        let mut __tmp = BytesMut::new(bytes);
7930        #[allow(clippy::absurd_extreme_comparisons)]
7931        #[allow(unused_comparisons)]
7932        if __tmp.remaining() < Self::ENCODED_LEN {
7933            panic!(
7934                "buffer is too small (need {} bytes, but got {})",
7935                Self::ENCODED_LEN,
7936                __tmp.remaining(),
7937            )
7938        }
7939        __tmp.put_f32_le(self.point_x);
7940        __tmp.put_f32_le(self.point_y);
7941        __tmp.put_f32_le(self.radius);
7942        __tmp.put_f32_le(self.rec_top_x);
7943        __tmp.put_f32_le(self.rec_top_y);
7944        __tmp.put_f32_le(self.rec_bottom_x);
7945        __tmp.put_f32_le(self.rec_bottom_y);
7946        __tmp.put_u8(self.tracking_status as u8);
7947        __tmp.put_u8(self.tracking_mode as u8);
7948        __tmp.put_u8(self.target_data.bits());
7949        if matches!(version, MavlinkVersion::V2) {
7950            __tmp.put_u8(self.camera_device_id);
7951            let len = __tmp.len();
7952            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7953        } else {
7954            __tmp.len()
7955        }
7956    }
7957}
7958#[doc = "Camera-IMU triggering and synchronisation message."]
7959#[doc = ""]
7960#[doc = "ID: 112"]
7961#[derive(Debug, Clone, PartialEq)]
7962#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7963#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7964#[cfg_attr(feature = "ts", derive(TS))]
7965#[cfg_attr(feature = "ts", ts(export))]
7966pub struct CAMERA_TRIGGER_DATA {
7967    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7968    pub time_usec: u64,
7969    #[doc = "Image frame sequence"]
7970    pub seq: u32,
7971}
7972impl CAMERA_TRIGGER_DATA {
7973    pub const ENCODED_LEN: usize = 12usize;
7974    pub const DEFAULT: Self = Self {
7975        time_usec: 0_u64,
7976        seq: 0_u32,
7977    };
7978    #[cfg(feature = "arbitrary")]
7979    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7980        use arbitrary::{Arbitrary, Unstructured};
7981        let mut buf = [0u8; 1024];
7982        rng.fill_bytes(&mut buf);
7983        let mut unstructured = Unstructured::new(&buf);
7984        Self::arbitrary(&mut unstructured).unwrap_or_default()
7985    }
7986}
7987impl Default for CAMERA_TRIGGER_DATA {
7988    fn default() -> Self {
7989        Self::DEFAULT.clone()
7990    }
7991}
7992impl MessageData for CAMERA_TRIGGER_DATA {
7993    type Message = MavMessage;
7994    const ID: u32 = 112u32;
7995    const NAME: &'static str = "CAMERA_TRIGGER";
7996    const EXTRA_CRC: u8 = 174u8;
7997    const ENCODED_LEN: usize = 12usize;
7998    fn deser(
7999        _version: MavlinkVersion,
8000        __input: &[u8],
8001    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8002        let avail_len = __input.len();
8003        let mut payload_buf = [0; Self::ENCODED_LEN];
8004        let mut buf = if avail_len < Self::ENCODED_LEN {
8005            payload_buf[0..avail_len].copy_from_slice(__input);
8006            Bytes::new(&payload_buf)
8007        } else {
8008            Bytes::new(__input)
8009        };
8010        let mut __struct = Self::default();
8011        __struct.time_usec = buf.get_u64_le();
8012        __struct.seq = buf.get_u32_le();
8013        Ok(__struct)
8014    }
8015    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8016        let mut __tmp = BytesMut::new(bytes);
8017        #[allow(clippy::absurd_extreme_comparisons)]
8018        #[allow(unused_comparisons)]
8019        if __tmp.remaining() < Self::ENCODED_LEN {
8020            panic!(
8021                "buffer is too small (need {} bytes, but got {})",
8022                Self::ENCODED_LEN,
8023                __tmp.remaining(),
8024            )
8025        }
8026        __tmp.put_u64_le(self.time_usec);
8027        __tmp.put_u32_le(self.seq);
8028        if matches!(version, MavlinkVersion::V2) {
8029            let len = __tmp.len();
8030            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8031        } else {
8032            __tmp.len()
8033        }
8034    }
8035}
8036#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8037#[doc = ""]
8038#[doc = "ID: 387"]
8039#[derive(Debug, Clone, PartialEq)]
8040#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8041#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8042#[cfg_attr(feature = "ts", derive(TS))]
8043#[cfg_attr(feature = "ts", ts(export))]
8044pub struct CANFD_FRAME_DATA {
8045    #[doc = "Frame ID"]
8046    pub id: u32,
8047    #[doc = "System ID."]
8048    pub target_system: u8,
8049    #[doc = "Component ID."]
8050    pub target_component: u8,
8051    #[doc = "bus number"]
8052    pub bus: u8,
8053    #[doc = "Frame length"]
8054    pub len: u8,
8055    #[doc = "Frame data"]
8056    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8057    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8058    pub data: [u8; 64],
8059}
8060impl CANFD_FRAME_DATA {
8061    pub const ENCODED_LEN: usize = 72usize;
8062    pub const DEFAULT: Self = Self {
8063        id: 0_u32,
8064        target_system: 0_u8,
8065        target_component: 0_u8,
8066        bus: 0_u8,
8067        len: 0_u8,
8068        data: [0_u8; 64usize],
8069    };
8070    #[cfg(feature = "arbitrary")]
8071    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8072        use arbitrary::{Arbitrary, Unstructured};
8073        let mut buf = [0u8; 1024];
8074        rng.fill_bytes(&mut buf);
8075        let mut unstructured = Unstructured::new(&buf);
8076        Self::arbitrary(&mut unstructured).unwrap_or_default()
8077    }
8078}
8079impl Default for CANFD_FRAME_DATA {
8080    fn default() -> Self {
8081        Self::DEFAULT.clone()
8082    }
8083}
8084impl MessageData for CANFD_FRAME_DATA {
8085    type Message = MavMessage;
8086    const ID: u32 = 387u32;
8087    const NAME: &'static str = "CANFD_FRAME";
8088    const EXTRA_CRC: u8 = 4u8;
8089    const ENCODED_LEN: usize = 72usize;
8090    fn deser(
8091        _version: MavlinkVersion,
8092        __input: &[u8],
8093    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8094        let avail_len = __input.len();
8095        let mut payload_buf = [0; Self::ENCODED_LEN];
8096        let mut buf = if avail_len < Self::ENCODED_LEN {
8097            payload_buf[0..avail_len].copy_from_slice(__input);
8098            Bytes::new(&payload_buf)
8099        } else {
8100            Bytes::new(__input)
8101        };
8102        let mut __struct = Self::default();
8103        __struct.id = buf.get_u32_le();
8104        __struct.target_system = buf.get_u8();
8105        __struct.target_component = buf.get_u8();
8106        __struct.bus = buf.get_u8();
8107        __struct.len = buf.get_u8();
8108        for v in &mut __struct.data {
8109            let val = buf.get_u8();
8110            *v = val;
8111        }
8112        Ok(__struct)
8113    }
8114    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8115        let mut __tmp = BytesMut::new(bytes);
8116        #[allow(clippy::absurd_extreme_comparisons)]
8117        #[allow(unused_comparisons)]
8118        if __tmp.remaining() < Self::ENCODED_LEN {
8119            panic!(
8120                "buffer is too small (need {} bytes, but got {})",
8121                Self::ENCODED_LEN,
8122                __tmp.remaining(),
8123            )
8124        }
8125        __tmp.put_u32_le(self.id);
8126        __tmp.put_u8(self.target_system);
8127        __tmp.put_u8(self.target_component);
8128        __tmp.put_u8(self.bus);
8129        __tmp.put_u8(self.len);
8130        for val in &self.data {
8131            __tmp.put_u8(*val);
8132        }
8133        if matches!(version, MavlinkVersion::V2) {
8134            let len = __tmp.len();
8135            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8136        } else {
8137            __tmp.len()
8138        }
8139    }
8140}
8141#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8142#[doc = ""]
8143#[doc = "ID: 388"]
8144#[derive(Debug, Clone, PartialEq)]
8145#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8146#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8147#[cfg_attr(feature = "ts", derive(TS))]
8148#[cfg_attr(feature = "ts", ts(export))]
8149pub struct CAN_FILTER_MODIFY_DATA {
8150    #[doc = "filter IDs, length num_ids"]
8151    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8152    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8153    pub ids: [u16; 16],
8154    #[doc = "System ID."]
8155    pub target_system: u8,
8156    #[doc = "Component ID."]
8157    pub target_component: u8,
8158    #[doc = "bus number"]
8159    pub bus: u8,
8160    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8161    pub operation: CanFilterOp,
8162    #[doc = "number of IDs in filter list"]
8163    pub num_ids: u8,
8164}
8165impl CAN_FILTER_MODIFY_DATA {
8166    pub const ENCODED_LEN: usize = 37usize;
8167    pub const DEFAULT: Self = Self {
8168        ids: [0_u16; 16usize],
8169        target_system: 0_u8,
8170        target_component: 0_u8,
8171        bus: 0_u8,
8172        operation: CanFilterOp::DEFAULT,
8173        num_ids: 0_u8,
8174    };
8175    #[cfg(feature = "arbitrary")]
8176    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8177        use arbitrary::{Arbitrary, Unstructured};
8178        let mut buf = [0u8; 1024];
8179        rng.fill_bytes(&mut buf);
8180        let mut unstructured = Unstructured::new(&buf);
8181        Self::arbitrary(&mut unstructured).unwrap_or_default()
8182    }
8183}
8184impl Default for CAN_FILTER_MODIFY_DATA {
8185    fn default() -> Self {
8186        Self::DEFAULT.clone()
8187    }
8188}
8189impl MessageData for CAN_FILTER_MODIFY_DATA {
8190    type Message = MavMessage;
8191    const ID: u32 = 388u32;
8192    const NAME: &'static str = "CAN_FILTER_MODIFY";
8193    const EXTRA_CRC: u8 = 8u8;
8194    const ENCODED_LEN: usize = 37usize;
8195    fn deser(
8196        _version: MavlinkVersion,
8197        __input: &[u8],
8198    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8199        let avail_len = __input.len();
8200        let mut payload_buf = [0; Self::ENCODED_LEN];
8201        let mut buf = if avail_len < Self::ENCODED_LEN {
8202            payload_buf[0..avail_len].copy_from_slice(__input);
8203            Bytes::new(&payload_buf)
8204        } else {
8205            Bytes::new(__input)
8206        };
8207        let mut __struct = Self::default();
8208        for v in &mut __struct.ids {
8209            let val = buf.get_u16_le();
8210            *v = val;
8211        }
8212        __struct.target_system = buf.get_u8();
8213        __struct.target_component = buf.get_u8();
8214        __struct.bus = buf.get_u8();
8215        let tmp = buf.get_u8();
8216        __struct.operation =
8217            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8218                enum_type: "CanFilterOp",
8219                value: tmp as u32,
8220            })?;
8221        __struct.num_ids = buf.get_u8();
8222        Ok(__struct)
8223    }
8224    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8225        let mut __tmp = BytesMut::new(bytes);
8226        #[allow(clippy::absurd_extreme_comparisons)]
8227        #[allow(unused_comparisons)]
8228        if __tmp.remaining() < Self::ENCODED_LEN {
8229            panic!(
8230                "buffer is too small (need {} bytes, but got {})",
8231                Self::ENCODED_LEN,
8232                __tmp.remaining(),
8233            )
8234        }
8235        for val in &self.ids {
8236            __tmp.put_u16_le(*val);
8237        }
8238        __tmp.put_u8(self.target_system);
8239        __tmp.put_u8(self.target_component);
8240        __tmp.put_u8(self.bus);
8241        __tmp.put_u8(self.operation as u8);
8242        __tmp.put_u8(self.num_ids);
8243        if matches!(version, MavlinkVersion::V2) {
8244            let len = __tmp.len();
8245            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8246        } else {
8247            __tmp.len()
8248        }
8249    }
8250}
8251#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8252#[doc = ""]
8253#[doc = "ID: 386"]
8254#[derive(Debug, Clone, PartialEq)]
8255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8256#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8257#[cfg_attr(feature = "ts", derive(TS))]
8258#[cfg_attr(feature = "ts", ts(export))]
8259pub struct CAN_FRAME_DATA {
8260    #[doc = "Frame ID"]
8261    pub id: u32,
8262    #[doc = "System ID."]
8263    pub target_system: u8,
8264    #[doc = "Component ID."]
8265    pub target_component: u8,
8266    #[doc = "Bus number"]
8267    pub bus: u8,
8268    #[doc = "Frame length"]
8269    pub len: u8,
8270    #[doc = "Frame data"]
8271    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8272    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8273    pub data: [u8; 8],
8274}
8275impl CAN_FRAME_DATA {
8276    pub const ENCODED_LEN: usize = 16usize;
8277    pub const DEFAULT: Self = Self {
8278        id: 0_u32,
8279        target_system: 0_u8,
8280        target_component: 0_u8,
8281        bus: 0_u8,
8282        len: 0_u8,
8283        data: [0_u8; 8usize],
8284    };
8285    #[cfg(feature = "arbitrary")]
8286    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8287        use arbitrary::{Arbitrary, Unstructured};
8288        let mut buf = [0u8; 1024];
8289        rng.fill_bytes(&mut buf);
8290        let mut unstructured = Unstructured::new(&buf);
8291        Self::arbitrary(&mut unstructured).unwrap_or_default()
8292    }
8293}
8294impl Default for CAN_FRAME_DATA {
8295    fn default() -> Self {
8296        Self::DEFAULT.clone()
8297    }
8298}
8299impl MessageData for CAN_FRAME_DATA {
8300    type Message = MavMessage;
8301    const ID: u32 = 386u32;
8302    const NAME: &'static str = "CAN_FRAME";
8303    const EXTRA_CRC: u8 = 132u8;
8304    const ENCODED_LEN: usize = 16usize;
8305    fn deser(
8306        _version: MavlinkVersion,
8307        __input: &[u8],
8308    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8309        let avail_len = __input.len();
8310        let mut payload_buf = [0; Self::ENCODED_LEN];
8311        let mut buf = if avail_len < Self::ENCODED_LEN {
8312            payload_buf[0..avail_len].copy_from_slice(__input);
8313            Bytes::new(&payload_buf)
8314        } else {
8315            Bytes::new(__input)
8316        };
8317        let mut __struct = Self::default();
8318        __struct.id = buf.get_u32_le();
8319        __struct.target_system = buf.get_u8();
8320        __struct.target_component = buf.get_u8();
8321        __struct.bus = buf.get_u8();
8322        __struct.len = buf.get_u8();
8323        for v in &mut __struct.data {
8324            let val = buf.get_u8();
8325            *v = val;
8326        }
8327        Ok(__struct)
8328    }
8329    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8330        let mut __tmp = BytesMut::new(bytes);
8331        #[allow(clippy::absurd_extreme_comparisons)]
8332        #[allow(unused_comparisons)]
8333        if __tmp.remaining() < Self::ENCODED_LEN {
8334            panic!(
8335                "buffer is too small (need {} bytes, but got {})",
8336                Self::ENCODED_LEN,
8337                __tmp.remaining(),
8338            )
8339        }
8340        __tmp.put_u32_le(self.id);
8341        __tmp.put_u8(self.target_system);
8342        __tmp.put_u8(self.target_component);
8343        __tmp.put_u8(self.bus);
8344        __tmp.put_u8(self.len);
8345        for val in &self.data {
8346            __tmp.put_u8(*val);
8347        }
8348        if matches!(version, MavlinkVersion::V2) {
8349            let len = __tmp.len();
8350            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8351        } else {
8352            __tmp.len()
8353        }
8354    }
8355}
8356#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8357#[doc = ""]
8358#[doc = "ID: 336"]
8359#[derive(Debug, Clone, PartialEq)]
8360#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8361#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8362#[cfg_attr(feature = "ts", derive(TS))]
8363#[cfg_attr(feature = "ts", ts(export))]
8364pub struct CELLULAR_CONFIG_DATA {
8365    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8366    pub enable_lte: u8,
8367    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8368    pub enable_pin: u8,
8369    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8370    #[cfg_attr(feature = "ts", ts(type = "string"))]
8371    pub pin: CharArray<16>,
8372    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8373    #[cfg_attr(feature = "ts", ts(type = "string"))]
8374    pub new_pin: CharArray<16>,
8375    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8376    #[cfg_attr(feature = "ts", ts(type = "string"))]
8377    pub apn: CharArray<32>,
8378    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8379    #[cfg_attr(feature = "ts", ts(type = "string"))]
8380    pub puk: CharArray<16>,
8381    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8382    pub roaming: u8,
8383    #[doc = "Message acceptance response (sent back to GS)."]
8384    pub response: CellularConfigResponse,
8385}
8386impl CELLULAR_CONFIG_DATA {
8387    pub const ENCODED_LEN: usize = 84usize;
8388    pub const DEFAULT: Self = Self {
8389        enable_lte: 0_u8,
8390        enable_pin: 0_u8,
8391        pin: CharArray::new([0_u8; 16usize]),
8392        new_pin: CharArray::new([0_u8; 16usize]),
8393        apn: CharArray::new([0_u8; 32usize]),
8394        puk: CharArray::new([0_u8; 16usize]),
8395        roaming: 0_u8,
8396        response: CellularConfigResponse::DEFAULT,
8397    };
8398    #[cfg(feature = "arbitrary")]
8399    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8400        use arbitrary::{Arbitrary, Unstructured};
8401        let mut buf = [0u8; 1024];
8402        rng.fill_bytes(&mut buf);
8403        let mut unstructured = Unstructured::new(&buf);
8404        Self::arbitrary(&mut unstructured).unwrap_or_default()
8405    }
8406}
8407impl Default for CELLULAR_CONFIG_DATA {
8408    fn default() -> Self {
8409        Self::DEFAULT.clone()
8410    }
8411}
8412impl MessageData for CELLULAR_CONFIG_DATA {
8413    type Message = MavMessage;
8414    const ID: u32 = 336u32;
8415    const NAME: &'static str = "CELLULAR_CONFIG";
8416    const EXTRA_CRC: u8 = 245u8;
8417    const ENCODED_LEN: usize = 84usize;
8418    fn deser(
8419        _version: MavlinkVersion,
8420        __input: &[u8],
8421    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8422        let avail_len = __input.len();
8423        let mut payload_buf = [0; Self::ENCODED_LEN];
8424        let mut buf = if avail_len < Self::ENCODED_LEN {
8425            payload_buf[0..avail_len].copy_from_slice(__input);
8426            Bytes::new(&payload_buf)
8427        } else {
8428            Bytes::new(__input)
8429        };
8430        let mut __struct = Self::default();
8431        __struct.enable_lte = buf.get_u8();
8432        __struct.enable_pin = buf.get_u8();
8433        let mut tmp = [0_u8; 16usize];
8434        for v in &mut tmp {
8435            *v = buf.get_u8();
8436        }
8437        __struct.pin = CharArray::new(tmp);
8438        let mut tmp = [0_u8; 16usize];
8439        for v in &mut tmp {
8440            *v = buf.get_u8();
8441        }
8442        __struct.new_pin = CharArray::new(tmp);
8443        let mut tmp = [0_u8; 32usize];
8444        for v in &mut tmp {
8445            *v = buf.get_u8();
8446        }
8447        __struct.apn = CharArray::new(tmp);
8448        let mut tmp = [0_u8; 16usize];
8449        for v in &mut tmp {
8450            *v = buf.get_u8();
8451        }
8452        __struct.puk = CharArray::new(tmp);
8453        __struct.roaming = buf.get_u8();
8454        let tmp = buf.get_u8();
8455        __struct.response =
8456            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8457                enum_type: "CellularConfigResponse",
8458                value: tmp as u32,
8459            })?;
8460        Ok(__struct)
8461    }
8462    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8463        let mut __tmp = BytesMut::new(bytes);
8464        #[allow(clippy::absurd_extreme_comparisons)]
8465        #[allow(unused_comparisons)]
8466        if __tmp.remaining() < Self::ENCODED_LEN {
8467            panic!(
8468                "buffer is too small (need {} bytes, but got {})",
8469                Self::ENCODED_LEN,
8470                __tmp.remaining(),
8471            )
8472        }
8473        __tmp.put_u8(self.enable_lte);
8474        __tmp.put_u8(self.enable_pin);
8475        for val in &self.pin {
8476            __tmp.put_u8(*val);
8477        }
8478        for val in &self.new_pin {
8479            __tmp.put_u8(*val);
8480        }
8481        for val in &self.apn {
8482            __tmp.put_u8(*val);
8483        }
8484        for val in &self.puk {
8485            __tmp.put_u8(*val);
8486        }
8487        __tmp.put_u8(self.roaming);
8488        __tmp.put_u8(self.response as u8);
8489        if matches!(version, MavlinkVersion::V2) {
8490            let len = __tmp.len();
8491            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8492        } else {
8493            __tmp.len()
8494        }
8495    }
8496}
8497#[doc = "Report current used cellular network status."]
8498#[doc = ""]
8499#[doc = "ID: 334"]
8500#[derive(Debug, Clone, PartialEq)]
8501#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8502#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8503#[cfg_attr(feature = "ts", derive(TS))]
8504#[cfg_attr(feature = "ts", ts(export))]
8505pub struct CELLULAR_STATUS_DATA {
8506    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
8507    pub mcc: u16,
8508    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
8509    pub mnc: u16,
8510    #[doc = "Location area code. If unknown, set to 0"]
8511    pub lac: u16,
8512    #[doc = "Cellular modem status"]
8513    pub status: CellularStatusFlag,
8514    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
8515    pub failure_reason: CellularNetworkFailedReason,
8516    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
8517    pub mavtype: CellularNetworkRadioType,
8518    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
8519    pub quality: u8,
8520}
8521impl CELLULAR_STATUS_DATA {
8522    pub const ENCODED_LEN: usize = 10usize;
8523    pub const DEFAULT: Self = Self {
8524        mcc: 0_u16,
8525        mnc: 0_u16,
8526        lac: 0_u16,
8527        status: CellularStatusFlag::DEFAULT,
8528        failure_reason: CellularNetworkFailedReason::DEFAULT,
8529        mavtype: CellularNetworkRadioType::DEFAULT,
8530        quality: 0_u8,
8531    };
8532    #[cfg(feature = "arbitrary")]
8533    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8534        use arbitrary::{Arbitrary, Unstructured};
8535        let mut buf = [0u8; 1024];
8536        rng.fill_bytes(&mut buf);
8537        let mut unstructured = Unstructured::new(&buf);
8538        Self::arbitrary(&mut unstructured).unwrap_or_default()
8539    }
8540}
8541impl Default for CELLULAR_STATUS_DATA {
8542    fn default() -> Self {
8543        Self::DEFAULT.clone()
8544    }
8545}
8546impl MessageData for CELLULAR_STATUS_DATA {
8547    type Message = MavMessage;
8548    const ID: u32 = 334u32;
8549    const NAME: &'static str = "CELLULAR_STATUS";
8550    const EXTRA_CRC: u8 = 72u8;
8551    const ENCODED_LEN: usize = 10usize;
8552    fn deser(
8553        _version: MavlinkVersion,
8554        __input: &[u8],
8555    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8556        let avail_len = __input.len();
8557        let mut payload_buf = [0; Self::ENCODED_LEN];
8558        let mut buf = if avail_len < Self::ENCODED_LEN {
8559            payload_buf[0..avail_len].copy_from_slice(__input);
8560            Bytes::new(&payload_buf)
8561        } else {
8562            Bytes::new(__input)
8563        };
8564        let mut __struct = Self::default();
8565        __struct.mcc = buf.get_u16_le();
8566        __struct.mnc = buf.get_u16_le();
8567        __struct.lac = buf.get_u16_le();
8568        let tmp = buf.get_u8();
8569        __struct.status =
8570            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8571                enum_type: "CellularStatusFlag",
8572                value: tmp as u32,
8573            })?;
8574        let tmp = buf.get_u8();
8575        __struct.failure_reason =
8576            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8577                enum_type: "CellularNetworkFailedReason",
8578                value: tmp as u32,
8579            })?;
8580        let tmp = buf.get_u8();
8581        __struct.mavtype =
8582            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8583                enum_type: "CellularNetworkRadioType",
8584                value: tmp as u32,
8585            })?;
8586        __struct.quality = buf.get_u8();
8587        Ok(__struct)
8588    }
8589    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8590        let mut __tmp = BytesMut::new(bytes);
8591        #[allow(clippy::absurd_extreme_comparisons)]
8592        #[allow(unused_comparisons)]
8593        if __tmp.remaining() < Self::ENCODED_LEN {
8594            panic!(
8595                "buffer is too small (need {} bytes, but got {})",
8596                Self::ENCODED_LEN,
8597                __tmp.remaining(),
8598            )
8599        }
8600        __tmp.put_u16_le(self.mcc);
8601        __tmp.put_u16_le(self.mnc);
8602        __tmp.put_u16_le(self.lac);
8603        __tmp.put_u8(self.status as u8);
8604        __tmp.put_u8(self.failure_reason as u8);
8605        __tmp.put_u8(self.mavtype as u8);
8606        __tmp.put_u8(self.quality);
8607        if matches!(version, MavlinkVersion::V2) {
8608            let len = __tmp.len();
8609            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8610        } else {
8611            __tmp.len()
8612        }
8613    }
8614}
8615#[doc = "Request to control this MAV."]
8616#[doc = ""]
8617#[doc = "ID: 5"]
8618#[derive(Debug, Clone, PartialEq)]
8619#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8620#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8621#[cfg_attr(feature = "ts", derive(TS))]
8622#[cfg_attr(feature = "ts", ts(export))]
8623pub struct CHANGE_OPERATOR_CONTROL_DATA {
8624    #[doc = "System the GCS requests control for"]
8625    pub target_system: u8,
8626    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8627    pub control_request: u8,
8628    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
8629    pub version: u8,
8630    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
8631    #[cfg_attr(feature = "ts", ts(type = "string"))]
8632    pub passkey: CharArray<25>,
8633}
8634impl CHANGE_OPERATOR_CONTROL_DATA {
8635    pub const ENCODED_LEN: usize = 28usize;
8636    pub const DEFAULT: Self = Self {
8637        target_system: 0_u8,
8638        control_request: 0_u8,
8639        version: 0_u8,
8640        passkey: CharArray::new([0_u8; 25usize]),
8641    };
8642    #[cfg(feature = "arbitrary")]
8643    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8644        use arbitrary::{Arbitrary, Unstructured};
8645        let mut buf = [0u8; 1024];
8646        rng.fill_bytes(&mut buf);
8647        let mut unstructured = Unstructured::new(&buf);
8648        Self::arbitrary(&mut unstructured).unwrap_or_default()
8649    }
8650}
8651impl Default for CHANGE_OPERATOR_CONTROL_DATA {
8652    fn default() -> Self {
8653        Self::DEFAULT.clone()
8654    }
8655}
8656impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
8657    type Message = MavMessage;
8658    const ID: u32 = 5u32;
8659    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
8660    const EXTRA_CRC: u8 = 217u8;
8661    const ENCODED_LEN: usize = 28usize;
8662    fn deser(
8663        _version: MavlinkVersion,
8664        __input: &[u8],
8665    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8666        let avail_len = __input.len();
8667        let mut payload_buf = [0; Self::ENCODED_LEN];
8668        let mut buf = if avail_len < Self::ENCODED_LEN {
8669            payload_buf[0..avail_len].copy_from_slice(__input);
8670            Bytes::new(&payload_buf)
8671        } else {
8672            Bytes::new(__input)
8673        };
8674        let mut __struct = Self::default();
8675        __struct.target_system = buf.get_u8();
8676        __struct.control_request = buf.get_u8();
8677        __struct.version = buf.get_u8();
8678        let mut tmp = [0_u8; 25usize];
8679        for v in &mut tmp {
8680            *v = buf.get_u8();
8681        }
8682        __struct.passkey = CharArray::new(tmp);
8683        Ok(__struct)
8684    }
8685    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8686        let mut __tmp = BytesMut::new(bytes);
8687        #[allow(clippy::absurd_extreme_comparisons)]
8688        #[allow(unused_comparisons)]
8689        if __tmp.remaining() < Self::ENCODED_LEN {
8690            panic!(
8691                "buffer is too small (need {} bytes, but got {})",
8692                Self::ENCODED_LEN,
8693                __tmp.remaining(),
8694            )
8695        }
8696        __tmp.put_u8(self.target_system);
8697        __tmp.put_u8(self.control_request);
8698        __tmp.put_u8(self.version);
8699        for val in &self.passkey {
8700            __tmp.put_u8(*val);
8701        }
8702        if matches!(version, MavlinkVersion::V2) {
8703            let len = __tmp.len();
8704            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8705        } else {
8706            __tmp.len()
8707        }
8708    }
8709}
8710#[doc = "Accept / deny control of this MAV."]
8711#[doc = ""]
8712#[doc = "ID: 6"]
8713#[derive(Debug, Clone, PartialEq)]
8714#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8715#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8716#[cfg_attr(feature = "ts", derive(TS))]
8717#[cfg_attr(feature = "ts", ts(export))]
8718pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
8719    #[doc = "ID of the GCS this message"]
8720    pub gcs_system_id: u8,
8721    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8722    pub control_request: u8,
8723    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
8724    pub ack: u8,
8725}
8726impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
8727    pub const ENCODED_LEN: usize = 3usize;
8728    pub const DEFAULT: Self = Self {
8729        gcs_system_id: 0_u8,
8730        control_request: 0_u8,
8731        ack: 0_u8,
8732    };
8733    #[cfg(feature = "arbitrary")]
8734    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8735        use arbitrary::{Arbitrary, Unstructured};
8736        let mut buf = [0u8; 1024];
8737        rng.fill_bytes(&mut buf);
8738        let mut unstructured = Unstructured::new(&buf);
8739        Self::arbitrary(&mut unstructured).unwrap_or_default()
8740    }
8741}
8742impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8743    fn default() -> Self {
8744        Self::DEFAULT.clone()
8745    }
8746}
8747impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8748    type Message = MavMessage;
8749    const ID: u32 = 6u32;
8750    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
8751    const EXTRA_CRC: u8 = 104u8;
8752    const ENCODED_LEN: usize = 3usize;
8753    fn deser(
8754        _version: MavlinkVersion,
8755        __input: &[u8],
8756    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8757        let avail_len = __input.len();
8758        let mut payload_buf = [0; Self::ENCODED_LEN];
8759        let mut buf = if avail_len < Self::ENCODED_LEN {
8760            payload_buf[0..avail_len].copy_from_slice(__input);
8761            Bytes::new(&payload_buf)
8762        } else {
8763            Bytes::new(__input)
8764        };
8765        let mut __struct = Self::default();
8766        __struct.gcs_system_id = buf.get_u8();
8767        __struct.control_request = buf.get_u8();
8768        __struct.ack = buf.get_u8();
8769        Ok(__struct)
8770    }
8771    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8772        let mut __tmp = BytesMut::new(bytes);
8773        #[allow(clippy::absurd_extreme_comparisons)]
8774        #[allow(unused_comparisons)]
8775        if __tmp.remaining() < Self::ENCODED_LEN {
8776            panic!(
8777                "buffer is too small (need {} bytes, but got {})",
8778                Self::ENCODED_LEN,
8779                __tmp.remaining(),
8780            )
8781        }
8782        __tmp.put_u8(self.gcs_system_id);
8783        __tmp.put_u8(self.control_request);
8784        __tmp.put_u8(self.ack);
8785        if matches!(version, MavlinkVersion::V2) {
8786            let len = __tmp.len();
8787            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8788        } else {
8789            __tmp.len()
8790        }
8791    }
8792}
8793#[doc = "Information about a potential collision."]
8794#[doc = ""]
8795#[doc = "ID: 247"]
8796#[derive(Debug, Clone, PartialEq)]
8797#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8798#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8799#[cfg_attr(feature = "ts", derive(TS))]
8800#[cfg_attr(feature = "ts", ts(export))]
8801pub struct COLLISION_DATA {
8802    #[doc = "Unique identifier, domain based on src field"]
8803    pub id: u32,
8804    #[doc = "Estimated time until collision occurs"]
8805    pub time_to_minimum_delta: f32,
8806    #[doc = "Closest vertical distance between vehicle and object"]
8807    pub altitude_minimum_delta: f32,
8808    #[doc = "Closest horizontal distance between vehicle and object"]
8809    pub horizontal_minimum_delta: f32,
8810    #[doc = "Collision data source"]
8811    pub src: MavCollisionSrc,
8812    #[doc = "Action that is being taken to avoid this collision"]
8813    pub action: MavCollisionAction,
8814    #[doc = "How concerned the aircraft is about this collision"]
8815    pub threat_level: MavCollisionThreatLevel,
8816}
8817impl COLLISION_DATA {
8818    pub const ENCODED_LEN: usize = 19usize;
8819    pub const DEFAULT: Self = Self {
8820        id: 0_u32,
8821        time_to_minimum_delta: 0.0_f32,
8822        altitude_minimum_delta: 0.0_f32,
8823        horizontal_minimum_delta: 0.0_f32,
8824        src: MavCollisionSrc::DEFAULT,
8825        action: MavCollisionAction::DEFAULT,
8826        threat_level: MavCollisionThreatLevel::DEFAULT,
8827    };
8828    #[cfg(feature = "arbitrary")]
8829    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8830        use arbitrary::{Arbitrary, Unstructured};
8831        let mut buf = [0u8; 1024];
8832        rng.fill_bytes(&mut buf);
8833        let mut unstructured = Unstructured::new(&buf);
8834        Self::arbitrary(&mut unstructured).unwrap_or_default()
8835    }
8836}
8837impl Default for COLLISION_DATA {
8838    fn default() -> Self {
8839        Self::DEFAULT.clone()
8840    }
8841}
8842impl MessageData for COLLISION_DATA {
8843    type Message = MavMessage;
8844    const ID: u32 = 247u32;
8845    const NAME: &'static str = "COLLISION";
8846    const EXTRA_CRC: u8 = 81u8;
8847    const ENCODED_LEN: usize = 19usize;
8848    fn deser(
8849        _version: MavlinkVersion,
8850        __input: &[u8],
8851    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8852        let avail_len = __input.len();
8853        let mut payload_buf = [0; Self::ENCODED_LEN];
8854        let mut buf = if avail_len < Self::ENCODED_LEN {
8855            payload_buf[0..avail_len].copy_from_slice(__input);
8856            Bytes::new(&payload_buf)
8857        } else {
8858            Bytes::new(__input)
8859        };
8860        let mut __struct = Self::default();
8861        __struct.id = buf.get_u32_le();
8862        __struct.time_to_minimum_delta = buf.get_f32_le();
8863        __struct.altitude_minimum_delta = buf.get_f32_le();
8864        __struct.horizontal_minimum_delta = buf.get_f32_le();
8865        let tmp = buf.get_u8();
8866        __struct.src =
8867            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8868                enum_type: "MavCollisionSrc",
8869                value: tmp as u32,
8870            })?;
8871        let tmp = buf.get_u8();
8872        __struct.action =
8873            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8874                enum_type: "MavCollisionAction",
8875                value: tmp as u32,
8876            })?;
8877        let tmp = buf.get_u8();
8878        __struct.threat_level =
8879            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8880                enum_type: "MavCollisionThreatLevel",
8881                value: tmp as u32,
8882            })?;
8883        Ok(__struct)
8884    }
8885    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8886        let mut __tmp = BytesMut::new(bytes);
8887        #[allow(clippy::absurd_extreme_comparisons)]
8888        #[allow(unused_comparisons)]
8889        if __tmp.remaining() < Self::ENCODED_LEN {
8890            panic!(
8891                "buffer is too small (need {} bytes, but got {})",
8892                Self::ENCODED_LEN,
8893                __tmp.remaining(),
8894            )
8895        }
8896        __tmp.put_u32_le(self.id);
8897        __tmp.put_f32_le(self.time_to_minimum_delta);
8898        __tmp.put_f32_le(self.altitude_minimum_delta);
8899        __tmp.put_f32_le(self.horizontal_minimum_delta);
8900        __tmp.put_u8(self.src as u8);
8901        __tmp.put_u8(self.action as u8);
8902        __tmp.put_u8(self.threat_level as u8);
8903        if matches!(version, MavlinkVersion::V2) {
8904            let len = __tmp.len();
8905            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8906        } else {
8907            __tmp.len()
8908        }
8909    }
8910}
8911#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8912#[doc = ""]
8913#[doc = "ID: 77"]
8914#[derive(Debug, Clone, PartialEq)]
8915#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8916#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8917#[cfg_attr(feature = "ts", derive(TS))]
8918#[cfg_attr(feature = "ts", ts(export))]
8919pub struct COMMAND_ACK_DATA {
8920    #[doc = "Command ID (of acknowledged command)."]
8921    pub command: MavCmd,
8922    #[doc = "Result of command."]
8923    pub result: MavResult,
8924    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
8925    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8926    pub progress: u8,
8927    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
8928    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8929    pub result_param2: i32,
8930    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8931    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8932    pub target_system: u8,
8933    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8934    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8935    pub target_component: u8,
8936}
8937impl COMMAND_ACK_DATA {
8938    pub const ENCODED_LEN: usize = 10usize;
8939    pub const DEFAULT: Self = Self {
8940        command: MavCmd::DEFAULT,
8941        result: MavResult::DEFAULT,
8942        progress: 0_u8,
8943        result_param2: 0_i32,
8944        target_system: 0_u8,
8945        target_component: 0_u8,
8946    };
8947    #[cfg(feature = "arbitrary")]
8948    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8949        use arbitrary::{Arbitrary, Unstructured};
8950        let mut buf = [0u8; 1024];
8951        rng.fill_bytes(&mut buf);
8952        let mut unstructured = Unstructured::new(&buf);
8953        Self::arbitrary(&mut unstructured).unwrap_or_default()
8954    }
8955}
8956impl Default for COMMAND_ACK_DATA {
8957    fn default() -> Self {
8958        Self::DEFAULT.clone()
8959    }
8960}
8961impl MessageData for COMMAND_ACK_DATA {
8962    type Message = MavMessage;
8963    const ID: u32 = 77u32;
8964    const NAME: &'static str = "COMMAND_ACK";
8965    const EXTRA_CRC: u8 = 143u8;
8966    const ENCODED_LEN: usize = 10usize;
8967    fn deser(
8968        _version: MavlinkVersion,
8969        __input: &[u8],
8970    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8971        let avail_len = __input.len();
8972        let mut payload_buf = [0; Self::ENCODED_LEN];
8973        let mut buf = if avail_len < Self::ENCODED_LEN {
8974            payload_buf[0..avail_len].copy_from_slice(__input);
8975            Bytes::new(&payload_buf)
8976        } else {
8977            Bytes::new(__input)
8978        };
8979        let mut __struct = Self::default();
8980        let tmp = buf.get_u16_le();
8981        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
8982            ::mavlink_core::error::ParserError::InvalidEnum {
8983                enum_type: "MavCmd",
8984                value: tmp as u32,
8985            },
8986        )?;
8987        let tmp = buf.get_u8();
8988        __struct.result =
8989            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8990                enum_type: "MavResult",
8991                value: tmp as u32,
8992            })?;
8993        __struct.progress = buf.get_u8();
8994        __struct.result_param2 = buf.get_i32_le();
8995        __struct.target_system = buf.get_u8();
8996        __struct.target_component = buf.get_u8();
8997        Ok(__struct)
8998    }
8999    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9000        let mut __tmp = BytesMut::new(bytes);
9001        #[allow(clippy::absurd_extreme_comparisons)]
9002        #[allow(unused_comparisons)]
9003        if __tmp.remaining() < Self::ENCODED_LEN {
9004            panic!(
9005                "buffer is too small (need {} bytes, but got {})",
9006                Self::ENCODED_LEN,
9007                __tmp.remaining(),
9008            )
9009        }
9010        __tmp.put_u16_le(self.command as u16);
9011        __tmp.put_u8(self.result as u8);
9012        if matches!(version, MavlinkVersion::V2) {
9013            __tmp.put_u8(self.progress);
9014            __tmp.put_i32_le(self.result_param2);
9015            __tmp.put_u8(self.target_system);
9016            __tmp.put_u8(self.target_component);
9017            let len = __tmp.len();
9018            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9019        } else {
9020            __tmp.len()
9021        }
9022    }
9023}
9024#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9025#[doc = ""]
9026#[doc = "ID: 80"]
9027#[derive(Debug, Clone, PartialEq)]
9028#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9029#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9030#[cfg_attr(feature = "ts", derive(TS))]
9031#[cfg_attr(feature = "ts", ts(export))]
9032pub struct COMMAND_CANCEL_DATA {
9033    #[doc = "Command ID (of command to cancel)."]
9034    pub command: MavCmd,
9035    #[doc = "System executing long running command. Should not be broadcast (0)."]
9036    pub target_system: u8,
9037    #[doc = "Component executing long running command."]
9038    pub target_component: u8,
9039}
9040impl COMMAND_CANCEL_DATA {
9041    pub const ENCODED_LEN: usize = 4usize;
9042    pub const DEFAULT: Self = Self {
9043        command: MavCmd::DEFAULT,
9044        target_system: 0_u8,
9045        target_component: 0_u8,
9046    };
9047    #[cfg(feature = "arbitrary")]
9048    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9049        use arbitrary::{Arbitrary, Unstructured};
9050        let mut buf = [0u8; 1024];
9051        rng.fill_bytes(&mut buf);
9052        let mut unstructured = Unstructured::new(&buf);
9053        Self::arbitrary(&mut unstructured).unwrap_or_default()
9054    }
9055}
9056impl Default for COMMAND_CANCEL_DATA {
9057    fn default() -> Self {
9058        Self::DEFAULT.clone()
9059    }
9060}
9061impl MessageData for COMMAND_CANCEL_DATA {
9062    type Message = MavMessage;
9063    const ID: u32 = 80u32;
9064    const NAME: &'static str = "COMMAND_CANCEL";
9065    const EXTRA_CRC: u8 = 14u8;
9066    const ENCODED_LEN: usize = 4usize;
9067    fn deser(
9068        _version: MavlinkVersion,
9069        __input: &[u8],
9070    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9071        let avail_len = __input.len();
9072        let mut payload_buf = [0; Self::ENCODED_LEN];
9073        let mut buf = if avail_len < Self::ENCODED_LEN {
9074            payload_buf[0..avail_len].copy_from_slice(__input);
9075            Bytes::new(&payload_buf)
9076        } else {
9077            Bytes::new(__input)
9078        };
9079        let mut __struct = Self::default();
9080        let tmp = buf.get_u16_le();
9081        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9082            ::mavlink_core::error::ParserError::InvalidEnum {
9083                enum_type: "MavCmd",
9084                value: tmp as u32,
9085            },
9086        )?;
9087        __struct.target_system = buf.get_u8();
9088        __struct.target_component = buf.get_u8();
9089        Ok(__struct)
9090    }
9091    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9092        let mut __tmp = BytesMut::new(bytes);
9093        #[allow(clippy::absurd_extreme_comparisons)]
9094        #[allow(unused_comparisons)]
9095        if __tmp.remaining() < Self::ENCODED_LEN {
9096            panic!(
9097                "buffer is too small (need {} bytes, but got {})",
9098                Self::ENCODED_LEN,
9099                __tmp.remaining(),
9100            )
9101        }
9102        __tmp.put_u16_le(self.command as u16);
9103        __tmp.put_u8(self.target_system);
9104        __tmp.put_u8(self.target_component);
9105        if matches!(version, MavlinkVersion::V2) {
9106            let len = __tmp.len();
9107            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9108        } else {
9109            __tmp.len()
9110        }
9111    }
9112}
9113#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9114#[doc = ""]
9115#[doc = "ID: 75"]
9116#[derive(Debug, Clone, PartialEq)]
9117#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9118#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9119#[cfg_attr(feature = "ts", derive(TS))]
9120#[cfg_attr(feature = "ts", ts(export))]
9121pub struct COMMAND_INT_DATA {
9122    #[doc = "PARAM1, see MAV_CMD enum"]
9123    pub param1: f32,
9124    #[doc = "PARAM2, see MAV_CMD enum"]
9125    pub param2: f32,
9126    #[doc = "PARAM3, see MAV_CMD enum"]
9127    pub param3: f32,
9128    #[doc = "PARAM4, see MAV_CMD enum"]
9129    pub param4: f32,
9130    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9131    pub x: i32,
9132    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9133    pub y: i32,
9134    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9135    pub z: f32,
9136    #[doc = "The scheduled action for the mission item."]
9137    pub command: MavCmd,
9138    #[doc = "System ID"]
9139    pub target_system: u8,
9140    #[doc = "Component ID"]
9141    pub target_component: u8,
9142    #[doc = "The coordinate system of the COMMAND."]
9143    pub frame: MavFrame,
9144    #[doc = "Not used."]
9145    pub current: u8,
9146    #[doc = "Not used (set 0)."]
9147    pub autocontinue: u8,
9148}
9149impl COMMAND_INT_DATA {
9150    pub const ENCODED_LEN: usize = 35usize;
9151    pub const DEFAULT: Self = Self {
9152        param1: 0.0_f32,
9153        param2: 0.0_f32,
9154        param3: 0.0_f32,
9155        param4: 0.0_f32,
9156        x: 0_i32,
9157        y: 0_i32,
9158        z: 0.0_f32,
9159        command: MavCmd::DEFAULT,
9160        target_system: 0_u8,
9161        target_component: 0_u8,
9162        frame: MavFrame::DEFAULT,
9163        current: 0_u8,
9164        autocontinue: 0_u8,
9165    };
9166    #[cfg(feature = "arbitrary")]
9167    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9168        use arbitrary::{Arbitrary, Unstructured};
9169        let mut buf = [0u8; 1024];
9170        rng.fill_bytes(&mut buf);
9171        let mut unstructured = Unstructured::new(&buf);
9172        Self::arbitrary(&mut unstructured).unwrap_or_default()
9173    }
9174}
9175impl Default for COMMAND_INT_DATA {
9176    fn default() -> Self {
9177        Self::DEFAULT.clone()
9178    }
9179}
9180impl MessageData for COMMAND_INT_DATA {
9181    type Message = MavMessage;
9182    const ID: u32 = 75u32;
9183    const NAME: &'static str = "COMMAND_INT";
9184    const EXTRA_CRC: u8 = 158u8;
9185    const ENCODED_LEN: usize = 35usize;
9186    fn deser(
9187        _version: MavlinkVersion,
9188        __input: &[u8],
9189    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9190        let avail_len = __input.len();
9191        let mut payload_buf = [0; Self::ENCODED_LEN];
9192        let mut buf = if avail_len < Self::ENCODED_LEN {
9193            payload_buf[0..avail_len].copy_from_slice(__input);
9194            Bytes::new(&payload_buf)
9195        } else {
9196            Bytes::new(__input)
9197        };
9198        let mut __struct = Self::default();
9199        __struct.param1 = buf.get_f32_le();
9200        __struct.param2 = buf.get_f32_le();
9201        __struct.param3 = buf.get_f32_le();
9202        __struct.param4 = buf.get_f32_le();
9203        __struct.x = buf.get_i32_le();
9204        __struct.y = buf.get_i32_le();
9205        __struct.z = buf.get_f32_le();
9206        let tmp = buf.get_u16_le();
9207        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9208            ::mavlink_core::error::ParserError::InvalidEnum {
9209                enum_type: "MavCmd",
9210                value: tmp as u32,
9211            },
9212        )?;
9213        __struct.target_system = buf.get_u8();
9214        __struct.target_component = buf.get_u8();
9215        let tmp = buf.get_u8();
9216        __struct.frame =
9217            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9218                enum_type: "MavFrame",
9219                value: tmp as u32,
9220            })?;
9221        __struct.current = buf.get_u8();
9222        __struct.autocontinue = buf.get_u8();
9223        Ok(__struct)
9224    }
9225    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9226        let mut __tmp = BytesMut::new(bytes);
9227        #[allow(clippy::absurd_extreme_comparisons)]
9228        #[allow(unused_comparisons)]
9229        if __tmp.remaining() < Self::ENCODED_LEN {
9230            panic!(
9231                "buffer is too small (need {} bytes, but got {})",
9232                Self::ENCODED_LEN,
9233                __tmp.remaining(),
9234            )
9235        }
9236        __tmp.put_f32_le(self.param1);
9237        __tmp.put_f32_le(self.param2);
9238        __tmp.put_f32_le(self.param3);
9239        __tmp.put_f32_le(self.param4);
9240        __tmp.put_i32_le(self.x);
9241        __tmp.put_i32_le(self.y);
9242        __tmp.put_f32_le(self.z);
9243        __tmp.put_u16_le(self.command as u16);
9244        __tmp.put_u8(self.target_system);
9245        __tmp.put_u8(self.target_component);
9246        __tmp.put_u8(self.frame as u8);
9247        __tmp.put_u8(self.current);
9248        __tmp.put_u8(self.autocontinue);
9249        if matches!(version, MavlinkVersion::V2) {
9250            let len = __tmp.len();
9251            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9252        } else {
9253            __tmp.len()
9254        }
9255    }
9256}
9257#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9258#[doc = ""]
9259#[doc = "ID: 76"]
9260#[derive(Debug, Clone, PartialEq)]
9261#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9262#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9263#[cfg_attr(feature = "ts", derive(TS))]
9264#[cfg_attr(feature = "ts", ts(export))]
9265pub struct COMMAND_LONG_DATA {
9266    #[doc = "Parameter 1 (for the specific command)."]
9267    pub param1: f32,
9268    #[doc = "Parameter 2 (for the specific command)."]
9269    pub param2: f32,
9270    #[doc = "Parameter 3 (for the specific command)."]
9271    pub param3: f32,
9272    #[doc = "Parameter 4 (for the specific command)."]
9273    pub param4: f32,
9274    #[doc = "Parameter 5 (for the specific command)."]
9275    pub param5: f32,
9276    #[doc = "Parameter 6 (for the specific command)."]
9277    pub param6: f32,
9278    #[doc = "Parameter 7 (for the specific command)."]
9279    pub param7: f32,
9280    #[doc = "Command ID (of command to send)."]
9281    pub command: MavCmd,
9282    #[doc = "System which should execute the command"]
9283    pub target_system: u8,
9284    #[doc = "Component which should execute the command, 0 for all components"]
9285    pub target_component: u8,
9286    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9287    pub confirmation: u8,
9288}
9289impl COMMAND_LONG_DATA {
9290    pub const ENCODED_LEN: usize = 33usize;
9291    pub const DEFAULT: Self = Self {
9292        param1: 0.0_f32,
9293        param2: 0.0_f32,
9294        param3: 0.0_f32,
9295        param4: 0.0_f32,
9296        param5: 0.0_f32,
9297        param6: 0.0_f32,
9298        param7: 0.0_f32,
9299        command: MavCmd::DEFAULT,
9300        target_system: 0_u8,
9301        target_component: 0_u8,
9302        confirmation: 0_u8,
9303    };
9304    #[cfg(feature = "arbitrary")]
9305    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9306        use arbitrary::{Arbitrary, Unstructured};
9307        let mut buf = [0u8; 1024];
9308        rng.fill_bytes(&mut buf);
9309        let mut unstructured = Unstructured::new(&buf);
9310        Self::arbitrary(&mut unstructured).unwrap_or_default()
9311    }
9312}
9313impl Default for COMMAND_LONG_DATA {
9314    fn default() -> Self {
9315        Self::DEFAULT.clone()
9316    }
9317}
9318impl MessageData for COMMAND_LONG_DATA {
9319    type Message = MavMessage;
9320    const ID: u32 = 76u32;
9321    const NAME: &'static str = "COMMAND_LONG";
9322    const EXTRA_CRC: u8 = 152u8;
9323    const ENCODED_LEN: usize = 33usize;
9324    fn deser(
9325        _version: MavlinkVersion,
9326        __input: &[u8],
9327    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9328        let avail_len = __input.len();
9329        let mut payload_buf = [0; Self::ENCODED_LEN];
9330        let mut buf = if avail_len < Self::ENCODED_LEN {
9331            payload_buf[0..avail_len].copy_from_slice(__input);
9332            Bytes::new(&payload_buf)
9333        } else {
9334            Bytes::new(__input)
9335        };
9336        let mut __struct = Self::default();
9337        __struct.param1 = buf.get_f32_le();
9338        __struct.param2 = buf.get_f32_le();
9339        __struct.param3 = buf.get_f32_le();
9340        __struct.param4 = buf.get_f32_le();
9341        __struct.param5 = buf.get_f32_le();
9342        __struct.param6 = buf.get_f32_le();
9343        __struct.param7 = buf.get_f32_le();
9344        let tmp = buf.get_u16_le();
9345        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9346            ::mavlink_core::error::ParserError::InvalidEnum {
9347                enum_type: "MavCmd",
9348                value: tmp as u32,
9349            },
9350        )?;
9351        __struct.target_system = buf.get_u8();
9352        __struct.target_component = buf.get_u8();
9353        __struct.confirmation = buf.get_u8();
9354        Ok(__struct)
9355    }
9356    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9357        let mut __tmp = BytesMut::new(bytes);
9358        #[allow(clippy::absurd_extreme_comparisons)]
9359        #[allow(unused_comparisons)]
9360        if __tmp.remaining() < Self::ENCODED_LEN {
9361            panic!(
9362                "buffer is too small (need {} bytes, but got {})",
9363                Self::ENCODED_LEN,
9364                __tmp.remaining(),
9365            )
9366        }
9367        __tmp.put_f32_le(self.param1);
9368        __tmp.put_f32_le(self.param2);
9369        __tmp.put_f32_le(self.param3);
9370        __tmp.put_f32_le(self.param4);
9371        __tmp.put_f32_le(self.param5);
9372        __tmp.put_f32_le(self.param6);
9373        __tmp.put_f32_le(self.param7);
9374        __tmp.put_u16_le(self.command as u16);
9375        __tmp.put_u8(self.target_system);
9376        __tmp.put_u8(self.target_component);
9377        __tmp.put_u8(self.confirmation);
9378        if matches!(version, MavlinkVersion::V2) {
9379            let len = __tmp.len();
9380            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9381        } else {
9382            __tmp.len()
9383        }
9384    }
9385}
9386#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9387#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9388#[doc = ""]
9389#[doc = "ID: 395"]
9390#[derive(Debug, Clone, PartialEq)]
9391#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9392#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9393#[cfg_attr(feature = "ts", derive(TS))]
9394#[cfg_attr(feature = "ts", ts(export))]
9395pub struct COMPONENT_INFORMATION_DATA {
9396    #[doc = "Timestamp (time since system boot)."]
9397    pub time_boot_ms: u32,
9398    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9399    pub general_metadata_file_crc: u32,
9400    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9401    pub peripherals_metadata_file_crc: u32,
9402    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9403    #[cfg_attr(feature = "ts", ts(type = "string"))]
9404    pub general_metadata_uri: CharArray<100>,
9405    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9406    #[cfg_attr(feature = "ts", ts(type = "string"))]
9407    pub peripherals_metadata_uri: CharArray<100>,
9408}
9409impl COMPONENT_INFORMATION_DATA {
9410    pub const ENCODED_LEN: usize = 212usize;
9411    pub const DEFAULT: Self = Self {
9412        time_boot_ms: 0_u32,
9413        general_metadata_file_crc: 0_u32,
9414        peripherals_metadata_file_crc: 0_u32,
9415        general_metadata_uri: CharArray::new([0_u8; 100usize]),
9416        peripherals_metadata_uri: CharArray::new([0_u8; 100usize]),
9417    };
9418    #[cfg(feature = "arbitrary")]
9419    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9420        use arbitrary::{Arbitrary, Unstructured};
9421        let mut buf = [0u8; 1024];
9422        rng.fill_bytes(&mut buf);
9423        let mut unstructured = Unstructured::new(&buf);
9424        Self::arbitrary(&mut unstructured).unwrap_or_default()
9425    }
9426}
9427impl Default for COMPONENT_INFORMATION_DATA {
9428    fn default() -> Self {
9429        Self::DEFAULT.clone()
9430    }
9431}
9432impl MessageData for COMPONENT_INFORMATION_DATA {
9433    type Message = MavMessage;
9434    const ID: u32 = 395u32;
9435    const NAME: &'static str = "COMPONENT_INFORMATION";
9436    const EXTRA_CRC: u8 = 0u8;
9437    const ENCODED_LEN: usize = 212usize;
9438    fn deser(
9439        _version: MavlinkVersion,
9440        __input: &[u8],
9441    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9442        let avail_len = __input.len();
9443        let mut payload_buf = [0; Self::ENCODED_LEN];
9444        let mut buf = if avail_len < Self::ENCODED_LEN {
9445            payload_buf[0..avail_len].copy_from_slice(__input);
9446            Bytes::new(&payload_buf)
9447        } else {
9448            Bytes::new(__input)
9449        };
9450        let mut __struct = Self::default();
9451        __struct.time_boot_ms = buf.get_u32_le();
9452        __struct.general_metadata_file_crc = buf.get_u32_le();
9453        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
9454        let mut tmp = [0_u8; 100usize];
9455        for v in &mut tmp {
9456            *v = buf.get_u8();
9457        }
9458        __struct.general_metadata_uri = CharArray::new(tmp);
9459        let mut tmp = [0_u8; 100usize];
9460        for v in &mut tmp {
9461            *v = buf.get_u8();
9462        }
9463        __struct.peripherals_metadata_uri = CharArray::new(tmp);
9464        Ok(__struct)
9465    }
9466    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9467        let mut __tmp = BytesMut::new(bytes);
9468        #[allow(clippy::absurd_extreme_comparisons)]
9469        #[allow(unused_comparisons)]
9470        if __tmp.remaining() < Self::ENCODED_LEN {
9471            panic!(
9472                "buffer is too small (need {} bytes, but got {})",
9473                Self::ENCODED_LEN,
9474                __tmp.remaining(),
9475            )
9476        }
9477        __tmp.put_u32_le(self.time_boot_ms);
9478        __tmp.put_u32_le(self.general_metadata_file_crc);
9479        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9480        for val in &self.general_metadata_uri {
9481            __tmp.put_u8(*val);
9482        }
9483        for val in &self.peripherals_metadata_uri {
9484            __tmp.put_u8(*val);
9485        }
9486        if matches!(version, MavlinkVersion::V2) {
9487            let len = __tmp.len();
9488            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9489        } else {
9490            __tmp.len()
9491        }
9492    }
9493}
9494#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
9495#[doc = ""]
9496#[doc = "ID: 396"]
9497#[derive(Debug, Clone, PartialEq)]
9498#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9500#[cfg_attr(feature = "ts", derive(TS))]
9501#[cfg_attr(feature = "ts", ts(export))]
9502pub struct COMPONENT_INFORMATION_BASIC_DATA {
9503    #[doc = "Component capability flags"]
9504    pub capabilities: MavProtocolCapability,
9505    #[doc = "Timestamp (time since system boot)."]
9506    pub time_boot_ms: u32,
9507    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
9508    pub time_manufacture_s: u32,
9509    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9510    #[cfg_attr(feature = "ts", ts(type = "string"))]
9511    pub vendor_name: CharArray<32>,
9512    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9513    #[cfg_attr(feature = "ts", ts(type = "string"))]
9514    pub model_name: CharArray<32>,
9515    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9516    #[cfg_attr(feature = "ts", ts(type = "string"))]
9517    pub software_version: CharArray<24>,
9518    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9519    #[cfg_attr(feature = "ts", ts(type = "string"))]
9520    pub hardware_version: CharArray<24>,
9521    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9522    #[cfg_attr(feature = "ts", ts(type = "string"))]
9523    pub serial_number: CharArray<32>,
9524}
9525impl COMPONENT_INFORMATION_BASIC_DATA {
9526    pub const ENCODED_LEN: usize = 160usize;
9527    pub const DEFAULT: Self = Self {
9528        capabilities: MavProtocolCapability::DEFAULT,
9529        time_boot_ms: 0_u32,
9530        time_manufacture_s: 0_u32,
9531        vendor_name: CharArray::new([0_u8; 32usize]),
9532        model_name: CharArray::new([0_u8; 32usize]),
9533        software_version: CharArray::new([0_u8; 24usize]),
9534        hardware_version: CharArray::new([0_u8; 24usize]),
9535        serial_number: CharArray::new([0_u8; 32usize]),
9536    };
9537    #[cfg(feature = "arbitrary")]
9538    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9539        use arbitrary::{Arbitrary, Unstructured};
9540        let mut buf = [0u8; 1024];
9541        rng.fill_bytes(&mut buf);
9542        let mut unstructured = Unstructured::new(&buf);
9543        Self::arbitrary(&mut unstructured).unwrap_or_default()
9544    }
9545}
9546impl Default for COMPONENT_INFORMATION_BASIC_DATA {
9547    fn default() -> Self {
9548        Self::DEFAULT.clone()
9549    }
9550}
9551impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
9552    type Message = MavMessage;
9553    const ID: u32 = 396u32;
9554    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
9555    const EXTRA_CRC: u8 = 50u8;
9556    const ENCODED_LEN: usize = 160usize;
9557    fn deser(
9558        _version: MavlinkVersion,
9559        __input: &[u8],
9560    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9561        let avail_len = __input.len();
9562        let mut payload_buf = [0; Self::ENCODED_LEN];
9563        let mut buf = if avail_len < Self::ENCODED_LEN {
9564            payload_buf[0..avail_len].copy_from_slice(__input);
9565            Bytes::new(&payload_buf)
9566        } else {
9567            Bytes::new(__input)
9568        };
9569        let mut __struct = Self::default();
9570        let tmp = buf.get_u64_le();
9571        __struct.capabilities = MavProtocolCapability::from_bits(
9572            tmp & MavProtocolCapability::all().bits(),
9573        )
9574        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9575            flag_type: "MavProtocolCapability",
9576            value: tmp as u32,
9577        })?;
9578        __struct.time_boot_ms = buf.get_u32_le();
9579        __struct.time_manufacture_s = buf.get_u32_le();
9580        let mut tmp = [0_u8; 32usize];
9581        for v in &mut tmp {
9582            *v = buf.get_u8();
9583        }
9584        __struct.vendor_name = CharArray::new(tmp);
9585        let mut tmp = [0_u8; 32usize];
9586        for v in &mut tmp {
9587            *v = buf.get_u8();
9588        }
9589        __struct.model_name = CharArray::new(tmp);
9590        let mut tmp = [0_u8; 24usize];
9591        for v in &mut tmp {
9592            *v = buf.get_u8();
9593        }
9594        __struct.software_version = CharArray::new(tmp);
9595        let mut tmp = [0_u8; 24usize];
9596        for v in &mut tmp {
9597            *v = buf.get_u8();
9598        }
9599        __struct.hardware_version = CharArray::new(tmp);
9600        let mut tmp = [0_u8; 32usize];
9601        for v in &mut tmp {
9602            *v = buf.get_u8();
9603        }
9604        __struct.serial_number = CharArray::new(tmp);
9605        Ok(__struct)
9606    }
9607    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9608        let mut __tmp = BytesMut::new(bytes);
9609        #[allow(clippy::absurd_extreme_comparisons)]
9610        #[allow(unused_comparisons)]
9611        if __tmp.remaining() < Self::ENCODED_LEN {
9612            panic!(
9613                "buffer is too small (need {} bytes, but got {})",
9614                Self::ENCODED_LEN,
9615                __tmp.remaining(),
9616            )
9617        }
9618        __tmp.put_u64_le(self.capabilities.bits());
9619        __tmp.put_u32_le(self.time_boot_ms);
9620        __tmp.put_u32_le(self.time_manufacture_s);
9621        for val in &self.vendor_name {
9622            __tmp.put_u8(*val);
9623        }
9624        for val in &self.model_name {
9625            __tmp.put_u8(*val);
9626        }
9627        for val in &self.software_version {
9628            __tmp.put_u8(*val);
9629        }
9630        for val in &self.hardware_version {
9631            __tmp.put_u8(*val);
9632        }
9633        for val in &self.serial_number {
9634            __tmp.put_u8(*val);
9635        }
9636        if matches!(version, MavlinkVersion::V2) {
9637            let len = __tmp.len();
9638            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9639        } else {
9640            __tmp.len()
9641        }
9642    }
9643}
9644#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
9645#[doc = ""]
9646#[doc = "ID: 397"]
9647#[derive(Debug, Clone, PartialEq)]
9648#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9649#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9650#[cfg_attr(feature = "ts", derive(TS))]
9651#[cfg_attr(feature = "ts", ts(export))]
9652pub struct COMPONENT_METADATA_DATA {
9653    #[doc = "Timestamp (time since system boot)."]
9654    pub time_boot_ms: u32,
9655    #[doc = "CRC32 of the general metadata file."]
9656    pub file_crc: u32,
9657    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9658    #[cfg_attr(feature = "ts", ts(type = "string"))]
9659    pub uri: CharArray<100>,
9660}
9661impl COMPONENT_METADATA_DATA {
9662    pub const ENCODED_LEN: usize = 108usize;
9663    pub const DEFAULT: Self = Self {
9664        time_boot_ms: 0_u32,
9665        file_crc: 0_u32,
9666        uri: CharArray::new([0_u8; 100usize]),
9667    };
9668    #[cfg(feature = "arbitrary")]
9669    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9670        use arbitrary::{Arbitrary, Unstructured};
9671        let mut buf = [0u8; 1024];
9672        rng.fill_bytes(&mut buf);
9673        let mut unstructured = Unstructured::new(&buf);
9674        Self::arbitrary(&mut unstructured).unwrap_or_default()
9675    }
9676}
9677impl Default for COMPONENT_METADATA_DATA {
9678    fn default() -> Self {
9679        Self::DEFAULT.clone()
9680    }
9681}
9682impl MessageData for COMPONENT_METADATA_DATA {
9683    type Message = MavMessage;
9684    const ID: u32 = 397u32;
9685    const NAME: &'static str = "COMPONENT_METADATA";
9686    const EXTRA_CRC: u8 = 182u8;
9687    const ENCODED_LEN: usize = 108usize;
9688    fn deser(
9689        _version: MavlinkVersion,
9690        __input: &[u8],
9691    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9692        let avail_len = __input.len();
9693        let mut payload_buf = [0; Self::ENCODED_LEN];
9694        let mut buf = if avail_len < Self::ENCODED_LEN {
9695            payload_buf[0..avail_len].copy_from_slice(__input);
9696            Bytes::new(&payload_buf)
9697        } else {
9698            Bytes::new(__input)
9699        };
9700        let mut __struct = Self::default();
9701        __struct.time_boot_ms = buf.get_u32_le();
9702        __struct.file_crc = buf.get_u32_le();
9703        let mut tmp = [0_u8; 100usize];
9704        for v in &mut tmp {
9705            *v = buf.get_u8();
9706        }
9707        __struct.uri = CharArray::new(tmp);
9708        Ok(__struct)
9709    }
9710    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9711        let mut __tmp = BytesMut::new(bytes);
9712        #[allow(clippy::absurd_extreme_comparisons)]
9713        #[allow(unused_comparisons)]
9714        if __tmp.remaining() < Self::ENCODED_LEN {
9715            panic!(
9716                "buffer is too small (need {} bytes, but got {})",
9717                Self::ENCODED_LEN,
9718                __tmp.remaining(),
9719            )
9720        }
9721        __tmp.put_u32_le(self.time_boot_ms);
9722        __tmp.put_u32_le(self.file_crc);
9723        for val in &self.uri {
9724            __tmp.put_u8(*val);
9725        }
9726        if matches!(version, MavlinkVersion::V2) {
9727            let len = __tmp.len();
9728            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9729        } else {
9730            __tmp.len()
9731        }
9732    }
9733}
9734#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
9735#[doc = ""]
9736#[doc = "ID: 146"]
9737#[derive(Debug, Clone, PartialEq)]
9738#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9739#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9740#[cfg_attr(feature = "ts", derive(TS))]
9741#[cfg_attr(feature = "ts", ts(export))]
9742pub struct CONTROL_SYSTEM_STATE_DATA {
9743    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9744    pub time_usec: u64,
9745    #[doc = "X acceleration in body frame"]
9746    pub x_acc: f32,
9747    #[doc = "Y acceleration in body frame"]
9748    pub y_acc: f32,
9749    #[doc = "Z acceleration in body frame"]
9750    pub z_acc: f32,
9751    #[doc = "X velocity in body frame"]
9752    pub x_vel: f32,
9753    #[doc = "Y velocity in body frame"]
9754    pub y_vel: f32,
9755    #[doc = "Z velocity in body frame"]
9756    pub z_vel: f32,
9757    #[doc = "X position in local frame"]
9758    pub x_pos: f32,
9759    #[doc = "Y position in local frame"]
9760    pub y_pos: f32,
9761    #[doc = "Z position in local frame"]
9762    pub z_pos: f32,
9763    #[doc = "Airspeed, set to -1 if unknown"]
9764    pub airspeed: f32,
9765    #[doc = "Variance of body velocity estimate"]
9766    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9767    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9768    pub vel_variance: [f32; 3],
9769    #[doc = "Variance in local position"]
9770    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9771    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9772    pub pos_variance: [f32; 3],
9773    #[doc = "The attitude, represented as Quaternion"]
9774    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9775    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9776    pub q: [f32; 4],
9777    #[doc = "Angular rate in roll axis"]
9778    pub roll_rate: f32,
9779    #[doc = "Angular rate in pitch axis"]
9780    pub pitch_rate: f32,
9781    #[doc = "Angular rate in yaw axis"]
9782    pub yaw_rate: f32,
9783}
9784impl CONTROL_SYSTEM_STATE_DATA {
9785    pub const ENCODED_LEN: usize = 100usize;
9786    pub const DEFAULT: Self = Self {
9787        time_usec: 0_u64,
9788        x_acc: 0.0_f32,
9789        y_acc: 0.0_f32,
9790        z_acc: 0.0_f32,
9791        x_vel: 0.0_f32,
9792        y_vel: 0.0_f32,
9793        z_vel: 0.0_f32,
9794        x_pos: 0.0_f32,
9795        y_pos: 0.0_f32,
9796        z_pos: 0.0_f32,
9797        airspeed: 0.0_f32,
9798        vel_variance: [0.0_f32; 3usize],
9799        pos_variance: [0.0_f32; 3usize],
9800        q: [0.0_f32; 4usize],
9801        roll_rate: 0.0_f32,
9802        pitch_rate: 0.0_f32,
9803        yaw_rate: 0.0_f32,
9804    };
9805    #[cfg(feature = "arbitrary")]
9806    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9807        use arbitrary::{Arbitrary, Unstructured};
9808        let mut buf = [0u8; 1024];
9809        rng.fill_bytes(&mut buf);
9810        let mut unstructured = Unstructured::new(&buf);
9811        Self::arbitrary(&mut unstructured).unwrap_or_default()
9812    }
9813}
9814impl Default for CONTROL_SYSTEM_STATE_DATA {
9815    fn default() -> Self {
9816        Self::DEFAULT.clone()
9817    }
9818}
9819impl MessageData for CONTROL_SYSTEM_STATE_DATA {
9820    type Message = MavMessage;
9821    const ID: u32 = 146u32;
9822    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
9823    const EXTRA_CRC: u8 = 103u8;
9824    const ENCODED_LEN: usize = 100usize;
9825    fn deser(
9826        _version: MavlinkVersion,
9827        __input: &[u8],
9828    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9829        let avail_len = __input.len();
9830        let mut payload_buf = [0; Self::ENCODED_LEN];
9831        let mut buf = if avail_len < Self::ENCODED_LEN {
9832            payload_buf[0..avail_len].copy_from_slice(__input);
9833            Bytes::new(&payload_buf)
9834        } else {
9835            Bytes::new(__input)
9836        };
9837        let mut __struct = Self::default();
9838        __struct.time_usec = buf.get_u64_le();
9839        __struct.x_acc = buf.get_f32_le();
9840        __struct.y_acc = buf.get_f32_le();
9841        __struct.z_acc = buf.get_f32_le();
9842        __struct.x_vel = buf.get_f32_le();
9843        __struct.y_vel = buf.get_f32_le();
9844        __struct.z_vel = buf.get_f32_le();
9845        __struct.x_pos = buf.get_f32_le();
9846        __struct.y_pos = buf.get_f32_le();
9847        __struct.z_pos = buf.get_f32_le();
9848        __struct.airspeed = buf.get_f32_le();
9849        for v in &mut __struct.vel_variance {
9850            let val = buf.get_f32_le();
9851            *v = val;
9852        }
9853        for v in &mut __struct.pos_variance {
9854            let val = buf.get_f32_le();
9855            *v = val;
9856        }
9857        for v in &mut __struct.q {
9858            let val = buf.get_f32_le();
9859            *v = val;
9860        }
9861        __struct.roll_rate = buf.get_f32_le();
9862        __struct.pitch_rate = buf.get_f32_le();
9863        __struct.yaw_rate = buf.get_f32_le();
9864        Ok(__struct)
9865    }
9866    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9867        let mut __tmp = BytesMut::new(bytes);
9868        #[allow(clippy::absurd_extreme_comparisons)]
9869        #[allow(unused_comparisons)]
9870        if __tmp.remaining() < Self::ENCODED_LEN {
9871            panic!(
9872                "buffer is too small (need {} bytes, but got {})",
9873                Self::ENCODED_LEN,
9874                __tmp.remaining(),
9875            )
9876        }
9877        __tmp.put_u64_le(self.time_usec);
9878        __tmp.put_f32_le(self.x_acc);
9879        __tmp.put_f32_le(self.y_acc);
9880        __tmp.put_f32_le(self.z_acc);
9881        __tmp.put_f32_le(self.x_vel);
9882        __tmp.put_f32_le(self.y_vel);
9883        __tmp.put_f32_le(self.z_vel);
9884        __tmp.put_f32_le(self.x_pos);
9885        __tmp.put_f32_le(self.y_pos);
9886        __tmp.put_f32_le(self.z_pos);
9887        __tmp.put_f32_le(self.airspeed);
9888        for val in &self.vel_variance {
9889            __tmp.put_f32_le(*val);
9890        }
9891        for val in &self.pos_variance {
9892            __tmp.put_f32_le(*val);
9893        }
9894        for val in &self.q {
9895            __tmp.put_f32_le(*val);
9896        }
9897        __tmp.put_f32_le(self.roll_rate);
9898        __tmp.put_f32_le(self.pitch_rate);
9899        __tmp.put_f32_le(self.yaw_rate);
9900        if matches!(version, MavlinkVersion::V2) {
9901            let len = __tmp.len();
9902            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9903        } else {
9904            __tmp.len()
9905        }
9906    }
9907}
9908#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
9909#[doc = ""]
9910#[doc = "ID: 411"]
9911#[derive(Debug, Clone, PartialEq)]
9912#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9913#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9914#[cfg_attr(feature = "ts", derive(TS))]
9915#[cfg_attr(feature = "ts", ts(export))]
9916pub struct CURRENT_EVENT_SEQUENCE_DATA {
9917    #[doc = "Sequence number."]
9918    pub sequence: u16,
9919    #[doc = "Flag bitset."]
9920    pub flags: MavEventCurrentSequenceFlags,
9921}
9922impl CURRENT_EVENT_SEQUENCE_DATA {
9923    pub const ENCODED_LEN: usize = 3usize;
9924    pub const DEFAULT: Self = Self {
9925        sequence: 0_u16,
9926        flags: MavEventCurrentSequenceFlags::DEFAULT,
9927    };
9928    #[cfg(feature = "arbitrary")]
9929    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9930        use arbitrary::{Arbitrary, Unstructured};
9931        let mut buf = [0u8; 1024];
9932        rng.fill_bytes(&mut buf);
9933        let mut unstructured = Unstructured::new(&buf);
9934        Self::arbitrary(&mut unstructured).unwrap_or_default()
9935    }
9936}
9937impl Default for CURRENT_EVENT_SEQUENCE_DATA {
9938    fn default() -> Self {
9939        Self::DEFAULT.clone()
9940    }
9941}
9942impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
9943    type Message = MavMessage;
9944    const ID: u32 = 411u32;
9945    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
9946    const EXTRA_CRC: u8 = 106u8;
9947    const ENCODED_LEN: usize = 3usize;
9948    fn deser(
9949        _version: MavlinkVersion,
9950        __input: &[u8],
9951    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9952        let avail_len = __input.len();
9953        let mut payload_buf = [0; Self::ENCODED_LEN];
9954        let mut buf = if avail_len < Self::ENCODED_LEN {
9955            payload_buf[0..avail_len].copy_from_slice(__input);
9956            Bytes::new(&payload_buf)
9957        } else {
9958            Bytes::new(__input)
9959        };
9960        let mut __struct = Self::default();
9961        __struct.sequence = buf.get_u16_le();
9962        let tmp = buf.get_u8();
9963        __struct.flags =
9964            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9965                enum_type: "MavEventCurrentSequenceFlags",
9966                value: tmp as u32,
9967            })?;
9968        Ok(__struct)
9969    }
9970    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9971        let mut __tmp = BytesMut::new(bytes);
9972        #[allow(clippy::absurd_extreme_comparisons)]
9973        #[allow(unused_comparisons)]
9974        if __tmp.remaining() < Self::ENCODED_LEN {
9975            panic!(
9976                "buffer is too small (need {} bytes, but got {})",
9977                Self::ENCODED_LEN,
9978                __tmp.remaining(),
9979            )
9980        }
9981        __tmp.put_u16_le(self.sequence);
9982        __tmp.put_u8(self.flags as u8);
9983        if matches!(version, MavlinkVersion::V2) {
9984            let len = __tmp.len();
9985            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9986        } else {
9987            __tmp.len()
9988        }
9989    }
9990}
9991#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
9992#[doc = ""]
9993#[doc = "ID: 436"]
9994#[derive(Debug, Clone, PartialEq)]
9995#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9996#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9997#[cfg_attr(feature = "ts", derive(TS))]
9998#[cfg_attr(feature = "ts", ts(export))]
9999pub struct CURRENT_MODE_DATA {
10000    #[doc = "A bitfield for use for autopilot-specific flags"]
10001    pub custom_mode: u32,
10002    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10003    pub intended_custom_mode: u32,
10004    #[doc = "Standard mode."]
10005    pub standard_mode: MavStandardMode,
10006}
10007impl CURRENT_MODE_DATA {
10008    pub const ENCODED_LEN: usize = 9usize;
10009    pub const DEFAULT: Self = Self {
10010        custom_mode: 0_u32,
10011        intended_custom_mode: 0_u32,
10012        standard_mode: MavStandardMode::DEFAULT,
10013    };
10014    #[cfg(feature = "arbitrary")]
10015    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10016        use arbitrary::{Arbitrary, Unstructured};
10017        let mut buf = [0u8; 1024];
10018        rng.fill_bytes(&mut buf);
10019        let mut unstructured = Unstructured::new(&buf);
10020        Self::arbitrary(&mut unstructured).unwrap_or_default()
10021    }
10022}
10023impl Default for CURRENT_MODE_DATA {
10024    fn default() -> Self {
10025        Self::DEFAULT.clone()
10026    }
10027}
10028impl MessageData for CURRENT_MODE_DATA {
10029    type Message = MavMessage;
10030    const ID: u32 = 436u32;
10031    const NAME: &'static str = "CURRENT_MODE";
10032    const EXTRA_CRC: u8 = 193u8;
10033    const ENCODED_LEN: usize = 9usize;
10034    fn deser(
10035        _version: MavlinkVersion,
10036        __input: &[u8],
10037    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10038        let avail_len = __input.len();
10039        let mut payload_buf = [0; Self::ENCODED_LEN];
10040        let mut buf = if avail_len < Self::ENCODED_LEN {
10041            payload_buf[0..avail_len].copy_from_slice(__input);
10042            Bytes::new(&payload_buf)
10043        } else {
10044            Bytes::new(__input)
10045        };
10046        let mut __struct = Self::default();
10047        __struct.custom_mode = buf.get_u32_le();
10048        __struct.intended_custom_mode = buf.get_u32_le();
10049        let tmp = buf.get_u8();
10050        __struct.standard_mode =
10051            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10052                enum_type: "MavStandardMode",
10053                value: tmp as u32,
10054            })?;
10055        Ok(__struct)
10056    }
10057    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10058        let mut __tmp = BytesMut::new(bytes);
10059        #[allow(clippy::absurd_extreme_comparisons)]
10060        #[allow(unused_comparisons)]
10061        if __tmp.remaining() < Self::ENCODED_LEN {
10062            panic!(
10063                "buffer is too small (need {} bytes, but got {})",
10064                Self::ENCODED_LEN,
10065                __tmp.remaining(),
10066            )
10067        }
10068        __tmp.put_u32_le(self.custom_mode);
10069        __tmp.put_u32_le(self.intended_custom_mode);
10070        __tmp.put_u8(self.standard_mode as u8);
10071        if matches!(version, MavlinkVersion::V2) {
10072            let len = __tmp.len();
10073            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10074        } else {
10075            __tmp.len()
10076        }
10077    }
10078}
10079#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10080#[doc = "Data stream status information."]
10081#[doc = ""]
10082#[doc = "ID: 67"]
10083#[derive(Debug, Clone, PartialEq)]
10084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10085#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10086#[cfg_attr(feature = "ts", derive(TS))]
10087#[cfg_attr(feature = "ts", ts(export))]
10088pub struct DATA_STREAM_DATA {
10089    #[doc = "The message rate"]
10090    pub message_rate: u16,
10091    #[doc = "The ID of the requested data stream"]
10092    pub stream_id: u8,
10093    #[doc = "1 stream is enabled, 0 stream is stopped."]
10094    pub on_off: u8,
10095}
10096impl DATA_STREAM_DATA {
10097    pub const ENCODED_LEN: usize = 4usize;
10098    pub const DEFAULT: Self = Self {
10099        message_rate: 0_u16,
10100        stream_id: 0_u8,
10101        on_off: 0_u8,
10102    };
10103    #[cfg(feature = "arbitrary")]
10104    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10105        use arbitrary::{Arbitrary, Unstructured};
10106        let mut buf = [0u8; 1024];
10107        rng.fill_bytes(&mut buf);
10108        let mut unstructured = Unstructured::new(&buf);
10109        Self::arbitrary(&mut unstructured).unwrap_or_default()
10110    }
10111}
10112impl Default for DATA_STREAM_DATA {
10113    fn default() -> Self {
10114        Self::DEFAULT.clone()
10115    }
10116}
10117impl MessageData for DATA_STREAM_DATA {
10118    type Message = MavMessage;
10119    const ID: u32 = 67u32;
10120    const NAME: &'static str = "DATA_STREAM";
10121    const EXTRA_CRC: u8 = 21u8;
10122    const ENCODED_LEN: usize = 4usize;
10123    fn deser(
10124        _version: MavlinkVersion,
10125        __input: &[u8],
10126    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10127        let avail_len = __input.len();
10128        let mut payload_buf = [0; Self::ENCODED_LEN];
10129        let mut buf = if avail_len < Self::ENCODED_LEN {
10130            payload_buf[0..avail_len].copy_from_slice(__input);
10131            Bytes::new(&payload_buf)
10132        } else {
10133            Bytes::new(__input)
10134        };
10135        let mut __struct = Self::default();
10136        __struct.message_rate = buf.get_u16_le();
10137        __struct.stream_id = buf.get_u8();
10138        __struct.on_off = buf.get_u8();
10139        Ok(__struct)
10140    }
10141    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10142        let mut __tmp = BytesMut::new(bytes);
10143        #[allow(clippy::absurd_extreme_comparisons)]
10144        #[allow(unused_comparisons)]
10145        if __tmp.remaining() < Self::ENCODED_LEN {
10146            panic!(
10147                "buffer is too small (need {} bytes, but got {})",
10148                Self::ENCODED_LEN,
10149                __tmp.remaining(),
10150            )
10151        }
10152        __tmp.put_u16_le(self.message_rate);
10153        __tmp.put_u8(self.stream_id);
10154        __tmp.put_u8(self.on_off);
10155        if matches!(version, MavlinkVersion::V2) {
10156            let len = __tmp.len();
10157            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10158        } else {
10159            __tmp.len()
10160        }
10161    }
10162}
10163#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10164#[doc = ""]
10165#[doc = "ID: 130"]
10166#[derive(Debug, Clone, PartialEq)]
10167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10169#[cfg_attr(feature = "ts", derive(TS))]
10170#[cfg_attr(feature = "ts", ts(export))]
10171pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
10172    #[doc = "total data size (set on ACK only)."]
10173    pub size: u32,
10174    #[doc = "Width of a matrix or image."]
10175    pub width: u16,
10176    #[doc = "Height of a matrix or image."]
10177    pub height: u16,
10178    #[doc = "Number of packets being sent (set on ACK only)."]
10179    pub packets: u16,
10180    #[doc = "Type of requested/acknowledged data."]
10181    pub mavtype: MavlinkDataStreamType,
10182    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
10183    pub payload: u8,
10184    #[doc = "JPEG quality. Values: [1-100]."]
10185    pub jpg_quality: u8,
10186}
10187impl DATA_TRANSMISSION_HANDSHAKE_DATA {
10188    pub const ENCODED_LEN: usize = 13usize;
10189    pub const DEFAULT: Self = Self {
10190        size: 0_u32,
10191        width: 0_u16,
10192        height: 0_u16,
10193        packets: 0_u16,
10194        mavtype: MavlinkDataStreamType::DEFAULT,
10195        payload: 0_u8,
10196        jpg_quality: 0_u8,
10197    };
10198    #[cfg(feature = "arbitrary")]
10199    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10200        use arbitrary::{Arbitrary, Unstructured};
10201        let mut buf = [0u8; 1024];
10202        rng.fill_bytes(&mut buf);
10203        let mut unstructured = Unstructured::new(&buf);
10204        Self::arbitrary(&mut unstructured).unwrap_or_default()
10205    }
10206}
10207impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10208    fn default() -> Self {
10209        Self::DEFAULT.clone()
10210    }
10211}
10212impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10213    type Message = MavMessage;
10214    const ID: u32 = 130u32;
10215    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10216    const EXTRA_CRC: u8 = 29u8;
10217    const ENCODED_LEN: usize = 13usize;
10218    fn deser(
10219        _version: MavlinkVersion,
10220        __input: &[u8],
10221    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10222        let avail_len = __input.len();
10223        let mut payload_buf = [0; Self::ENCODED_LEN];
10224        let mut buf = if avail_len < Self::ENCODED_LEN {
10225            payload_buf[0..avail_len].copy_from_slice(__input);
10226            Bytes::new(&payload_buf)
10227        } else {
10228            Bytes::new(__input)
10229        };
10230        let mut __struct = Self::default();
10231        __struct.size = buf.get_u32_le();
10232        __struct.width = buf.get_u16_le();
10233        __struct.height = buf.get_u16_le();
10234        __struct.packets = buf.get_u16_le();
10235        let tmp = buf.get_u8();
10236        __struct.mavtype =
10237            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10238                enum_type: "MavlinkDataStreamType",
10239                value: tmp as u32,
10240            })?;
10241        __struct.payload = buf.get_u8();
10242        __struct.jpg_quality = buf.get_u8();
10243        Ok(__struct)
10244    }
10245    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10246        let mut __tmp = BytesMut::new(bytes);
10247        #[allow(clippy::absurd_extreme_comparisons)]
10248        #[allow(unused_comparisons)]
10249        if __tmp.remaining() < Self::ENCODED_LEN {
10250            panic!(
10251                "buffer is too small (need {} bytes, but got {})",
10252                Self::ENCODED_LEN,
10253                __tmp.remaining(),
10254            )
10255        }
10256        __tmp.put_u32_le(self.size);
10257        __tmp.put_u16_le(self.width);
10258        __tmp.put_u16_le(self.height);
10259        __tmp.put_u16_le(self.packets);
10260        __tmp.put_u8(self.mavtype as u8);
10261        __tmp.put_u8(self.payload);
10262        __tmp.put_u8(self.jpg_quality);
10263        if matches!(version, MavlinkVersion::V2) {
10264            let len = __tmp.len();
10265            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10266        } else {
10267            __tmp.len()
10268        }
10269    }
10270}
10271#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10272#[doc = ""]
10273#[doc = "ID: 254"]
10274#[derive(Debug, Clone, PartialEq)]
10275#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10276#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10277#[cfg_attr(feature = "ts", derive(TS))]
10278#[cfg_attr(feature = "ts", ts(export))]
10279pub struct DEBUG_DATA {
10280    #[doc = "Timestamp (time since system boot)."]
10281    pub time_boot_ms: u32,
10282    #[doc = "DEBUG value"]
10283    pub value: f32,
10284    #[doc = "index of debug variable"]
10285    pub ind: u8,
10286}
10287impl DEBUG_DATA {
10288    pub const ENCODED_LEN: usize = 9usize;
10289    pub const DEFAULT: Self = Self {
10290        time_boot_ms: 0_u32,
10291        value: 0.0_f32,
10292        ind: 0_u8,
10293    };
10294    #[cfg(feature = "arbitrary")]
10295    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10296        use arbitrary::{Arbitrary, Unstructured};
10297        let mut buf = [0u8; 1024];
10298        rng.fill_bytes(&mut buf);
10299        let mut unstructured = Unstructured::new(&buf);
10300        Self::arbitrary(&mut unstructured).unwrap_or_default()
10301    }
10302}
10303impl Default for DEBUG_DATA {
10304    fn default() -> Self {
10305        Self::DEFAULT.clone()
10306    }
10307}
10308impl MessageData for DEBUG_DATA {
10309    type Message = MavMessage;
10310    const ID: u32 = 254u32;
10311    const NAME: &'static str = "DEBUG";
10312    const EXTRA_CRC: u8 = 46u8;
10313    const ENCODED_LEN: usize = 9usize;
10314    fn deser(
10315        _version: MavlinkVersion,
10316        __input: &[u8],
10317    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10318        let avail_len = __input.len();
10319        let mut payload_buf = [0; Self::ENCODED_LEN];
10320        let mut buf = if avail_len < Self::ENCODED_LEN {
10321            payload_buf[0..avail_len].copy_from_slice(__input);
10322            Bytes::new(&payload_buf)
10323        } else {
10324            Bytes::new(__input)
10325        };
10326        let mut __struct = Self::default();
10327        __struct.time_boot_ms = buf.get_u32_le();
10328        __struct.value = buf.get_f32_le();
10329        __struct.ind = buf.get_u8();
10330        Ok(__struct)
10331    }
10332    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10333        let mut __tmp = BytesMut::new(bytes);
10334        #[allow(clippy::absurd_extreme_comparisons)]
10335        #[allow(unused_comparisons)]
10336        if __tmp.remaining() < Self::ENCODED_LEN {
10337            panic!(
10338                "buffer is too small (need {} bytes, but got {})",
10339                Self::ENCODED_LEN,
10340                __tmp.remaining(),
10341            )
10342        }
10343        __tmp.put_u32_le(self.time_boot_ms);
10344        __tmp.put_f32_le(self.value);
10345        __tmp.put_u8(self.ind);
10346        if matches!(version, MavlinkVersion::V2) {
10347            let len = __tmp.len();
10348            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10349        } else {
10350            __tmp.len()
10351        }
10352    }
10353}
10354#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10355#[doc = ""]
10356#[doc = "ID: 350"]
10357#[derive(Debug, Clone, PartialEq)]
10358#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10359#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10360#[cfg_attr(feature = "ts", derive(TS))]
10361#[cfg_attr(feature = "ts", ts(export))]
10362pub struct DEBUG_FLOAT_ARRAY_DATA {
10363    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10364    pub time_usec: u64,
10365    #[doc = "Unique ID used to discriminate between arrays"]
10366    pub array_id: u16,
10367    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10368    #[cfg_attr(feature = "ts", ts(type = "string"))]
10369    pub name: CharArray<10>,
10370    #[doc = "data"]
10371    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10372    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10373    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10374    pub data: [f32; 58],
10375}
10376impl DEBUG_FLOAT_ARRAY_DATA {
10377    pub const ENCODED_LEN: usize = 252usize;
10378    pub const DEFAULT: Self = Self {
10379        time_usec: 0_u64,
10380        array_id: 0_u16,
10381        name: CharArray::new([0_u8; 10usize]),
10382        data: [0.0_f32; 58usize],
10383    };
10384    #[cfg(feature = "arbitrary")]
10385    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10386        use arbitrary::{Arbitrary, Unstructured};
10387        let mut buf = [0u8; 1024];
10388        rng.fill_bytes(&mut buf);
10389        let mut unstructured = Unstructured::new(&buf);
10390        Self::arbitrary(&mut unstructured).unwrap_or_default()
10391    }
10392}
10393impl Default for DEBUG_FLOAT_ARRAY_DATA {
10394    fn default() -> Self {
10395        Self::DEFAULT.clone()
10396    }
10397}
10398impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10399    type Message = MavMessage;
10400    const ID: u32 = 350u32;
10401    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10402    const EXTRA_CRC: u8 = 232u8;
10403    const ENCODED_LEN: usize = 252usize;
10404    fn deser(
10405        _version: MavlinkVersion,
10406        __input: &[u8],
10407    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10408        let avail_len = __input.len();
10409        let mut payload_buf = [0; Self::ENCODED_LEN];
10410        let mut buf = if avail_len < Self::ENCODED_LEN {
10411            payload_buf[0..avail_len].copy_from_slice(__input);
10412            Bytes::new(&payload_buf)
10413        } else {
10414            Bytes::new(__input)
10415        };
10416        let mut __struct = Self::default();
10417        __struct.time_usec = buf.get_u64_le();
10418        __struct.array_id = buf.get_u16_le();
10419        let mut tmp = [0_u8; 10usize];
10420        for v in &mut tmp {
10421            *v = buf.get_u8();
10422        }
10423        __struct.name = CharArray::new(tmp);
10424        for v in &mut __struct.data {
10425            let val = buf.get_f32_le();
10426            *v = val;
10427        }
10428        Ok(__struct)
10429    }
10430    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10431        let mut __tmp = BytesMut::new(bytes);
10432        #[allow(clippy::absurd_extreme_comparisons)]
10433        #[allow(unused_comparisons)]
10434        if __tmp.remaining() < Self::ENCODED_LEN {
10435            panic!(
10436                "buffer is too small (need {} bytes, but got {})",
10437                Self::ENCODED_LEN,
10438                __tmp.remaining(),
10439            )
10440        }
10441        __tmp.put_u64_le(self.time_usec);
10442        __tmp.put_u16_le(self.array_id);
10443        for val in &self.name {
10444            __tmp.put_u8(*val);
10445        }
10446        if matches!(version, MavlinkVersion::V2) {
10447            for val in &self.data {
10448                __tmp.put_f32_le(*val);
10449            }
10450            let len = __tmp.len();
10451            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10452        } else {
10453            __tmp.len()
10454        }
10455    }
10456}
10457#[doc = "To debug something using a named 3D vector."]
10458#[doc = ""]
10459#[doc = "ID: 250"]
10460#[derive(Debug, Clone, PartialEq)]
10461#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10462#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10463#[cfg_attr(feature = "ts", derive(TS))]
10464#[cfg_attr(feature = "ts", ts(export))]
10465pub struct DEBUG_VECT_DATA {
10466    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10467    pub time_usec: u64,
10468    #[doc = "x"]
10469    pub x: f32,
10470    #[doc = "y"]
10471    pub y: f32,
10472    #[doc = "z"]
10473    pub z: f32,
10474    #[doc = "Name"]
10475    #[cfg_attr(feature = "ts", ts(type = "string"))]
10476    pub name: CharArray<10>,
10477}
10478impl DEBUG_VECT_DATA {
10479    pub const ENCODED_LEN: usize = 30usize;
10480    pub const DEFAULT: Self = Self {
10481        time_usec: 0_u64,
10482        x: 0.0_f32,
10483        y: 0.0_f32,
10484        z: 0.0_f32,
10485        name: CharArray::new([0_u8; 10usize]),
10486    };
10487    #[cfg(feature = "arbitrary")]
10488    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10489        use arbitrary::{Arbitrary, Unstructured};
10490        let mut buf = [0u8; 1024];
10491        rng.fill_bytes(&mut buf);
10492        let mut unstructured = Unstructured::new(&buf);
10493        Self::arbitrary(&mut unstructured).unwrap_or_default()
10494    }
10495}
10496impl Default for DEBUG_VECT_DATA {
10497    fn default() -> Self {
10498        Self::DEFAULT.clone()
10499    }
10500}
10501impl MessageData for DEBUG_VECT_DATA {
10502    type Message = MavMessage;
10503    const ID: u32 = 250u32;
10504    const NAME: &'static str = "DEBUG_VECT";
10505    const EXTRA_CRC: u8 = 49u8;
10506    const ENCODED_LEN: usize = 30usize;
10507    fn deser(
10508        _version: MavlinkVersion,
10509        __input: &[u8],
10510    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10511        let avail_len = __input.len();
10512        let mut payload_buf = [0; Self::ENCODED_LEN];
10513        let mut buf = if avail_len < Self::ENCODED_LEN {
10514            payload_buf[0..avail_len].copy_from_slice(__input);
10515            Bytes::new(&payload_buf)
10516        } else {
10517            Bytes::new(__input)
10518        };
10519        let mut __struct = Self::default();
10520        __struct.time_usec = buf.get_u64_le();
10521        __struct.x = buf.get_f32_le();
10522        __struct.y = buf.get_f32_le();
10523        __struct.z = buf.get_f32_le();
10524        let mut tmp = [0_u8; 10usize];
10525        for v in &mut tmp {
10526            *v = buf.get_u8();
10527        }
10528        __struct.name = CharArray::new(tmp);
10529        Ok(__struct)
10530    }
10531    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10532        let mut __tmp = BytesMut::new(bytes);
10533        #[allow(clippy::absurd_extreme_comparisons)]
10534        #[allow(unused_comparisons)]
10535        if __tmp.remaining() < Self::ENCODED_LEN {
10536            panic!(
10537                "buffer is too small (need {} bytes, but got {})",
10538                Self::ENCODED_LEN,
10539                __tmp.remaining(),
10540            )
10541        }
10542        __tmp.put_u64_le(self.time_usec);
10543        __tmp.put_f32_le(self.x);
10544        __tmp.put_f32_le(self.y);
10545        __tmp.put_f32_le(self.z);
10546        for val in &self.name {
10547            __tmp.put_u8(*val);
10548        }
10549        if matches!(version, MavlinkVersion::V2) {
10550            let len = __tmp.len();
10551            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10552        } else {
10553            __tmp.len()
10554        }
10555    }
10556}
10557#[doc = "Distance sensor information for an onboard rangefinder."]
10558#[doc = ""]
10559#[doc = "ID: 132"]
10560#[derive(Debug, Clone, PartialEq)]
10561#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10562#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10563#[cfg_attr(feature = "ts", derive(TS))]
10564#[cfg_attr(feature = "ts", ts(export))]
10565pub struct DISTANCE_SENSOR_DATA {
10566    #[doc = "Timestamp (time since system boot)."]
10567    pub time_boot_ms: u32,
10568    #[doc = "Minimum distance the sensor can measure"]
10569    pub min_distance: u16,
10570    #[doc = "Maximum distance the sensor can measure"]
10571    pub max_distance: u16,
10572    #[doc = "Current distance reading"]
10573    pub current_distance: u16,
10574    #[doc = "Type of distance sensor."]
10575    pub mavtype: MavDistanceSensor,
10576    #[doc = "Onboard ID of the sensor"]
10577    pub id: u8,
10578    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
10579    pub orientation: MavSensorOrientation,
10580    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
10581    pub covariance: u8,
10582    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10583    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10584    pub horizontal_fov: f32,
10585    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10586    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10587    pub vertical_fov: f32,
10588    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
10589    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10590    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10591    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10592    pub quaternion: [f32; 4],
10593    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
10594    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10595    pub signal_quality: u8,
10596}
10597impl DISTANCE_SENSOR_DATA {
10598    pub const ENCODED_LEN: usize = 39usize;
10599    pub const DEFAULT: Self = Self {
10600        time_boot_ms: 0_u32,
10601        min_distance: 0_u16,
10602        max_distance: 0_u16,
10603        current_distance: 0_u16,
10604        mavtype: MavDistanceSensor::DEFAULT,
10605        id: 0_u8,
10606        orientation: MavSensorOrientation::DEFAULT,
10607        covariance: 0_u8,
10608        horizontal_fov: 0.0_f32,
10609        vertical_fov: 0.0_f32,
10610        quaternion: [0.0_f32; 4usize],
10611        signal_quality: 0_u8,
10612    };
10613    #[cfg(feature = "arbitrary")]
10614    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10615        use arbitrary::{Arbitrary, Unstructured};
10616        let mut buf = [0u8; 1024];
10617        rng.fill_bytes(&mut buf);
10618        let mut unstructured = Unstructured::new(&buf);
10619        Self::arbitrary(&mut unstructured).unwrap_or_default()
10620    }
10621}
10622impl Default for DISTANCE_SENSOR_DATA {
10623    fn default() -> Self {
10624        Self::DEFAULT.clone()
10625    }
10626}
10627impl MessageData for DISTANCE_SENSOR_DATA {
10628    type Message = MavMessage;
10629    const ID: u32 = 132u32;
10630    const NAME: &'static str = "DISTANCE_SENSOR";
10631    const EXTRA_CRC: u8 = 85u8;
10632    const ENCODED_LEN: usize = 39usize;
10633    fn deser(
10634        _version: MavlinkVersion,
10635        __input: &[u8],
10636    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10637        let avail_len = __input.len();
10638        let mut payload_buf = [0; Self::ENCODED_LEN];
10639        let mut buf = if avail_len < Self::ENCODED_LEN {
10640            payload_buf[0..avail_len].copy_from_slice(__input);
10641            Bytes::new(&payload_buf)
10642        } else {
10643            Bytes::new(__input)
10644        };
10645        let mut __struct = Self::default();
10646        __struct.time_boot_ms = buf.get_u32_le();
10647        __struct.min_distance = buf.get_u16_le();
10648        __struct.max_distance = buf.get_u16_le();
10649        __struct.current_distance = buf.get_u16_le();
10650        let tmp = buf.get_u8();
10651        __struct.mavtype =
10652            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10653                enum_type: "MavDistanceSensor",
10654                value: tmp as u32,
10655            })?;
10656        __struct.id = buf.get_u8();
10657        let tmp = buf.get_u8();
10658        __struct.orientation =
10659            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10660                enum_type: "MavSensorOrientation",
10661                value: tmp as u32,
10662            })?;
10663        __struct.covariance = buf.get_u8();
10664        __struct.horizontal_fov = buf.get_f32_le();
10665        __struct.vertical_fov = buf.get_f32_le();
10666        for v in &mut __struct.quaternion {
10667            let val = buf.get_f32_le();
10668            *v = val;
10669        }
10670        __struct.signal_quality = buf.get_u8();
10671        Ok(__struct)
10672    }
10673    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10674        let mut __tmp = BytesMut::new(bytes);
10675        #[allow(clippy::absurd_extreme_comparisons)]
10676        #[allow(unused_comparisons)]
10677        if __tmp.remaining() < Self::ENCODED_LEN {
10678            panic!(
10679                "buffer is too small (need {} bytes, but got {})",
10680                Self::ENCODED_LEN,
10681                __tmp.remaining(),
10682            )
10683        }
10684        __tmp.put_u32_le(self.time_boot_ms);
10685        __tmp.put_u16_le(self.min_distance);
10686        __tmp.put_u16_le(self.max_distance);
10687        __tmp.put_u16_le(self.current_distance);
10688        __tmp.put_u8(self.mavtype as u8);
10689        __tmp.put_u8(self.id);
10690        __tmp.put_u8(self.orientation as u8);
10691        __tmp.put_u8(self.covariance);
10692        if matches!(version, MavlinkVersion::V2) {
10693            __tmp.put_f32_le(self.horizontal_fov);
10694            __tmp.put_f32_le(self.vertical_fov);
10695            for val in &self.quaternion {
10696                __tmp.put_f32_le(*val);
10697            }
10698            __tmp.put_u8(self.signal_quality);
10699            let len = __tmp.len();
10700            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10701        } else {
10702            __tmp.len()
10703        }
10704    }
10705}
10706#[doc = "EFI status output."]
10707#[doc = ""]
10708#[doc = "ID: 225"]
10709#[derive(Debug, Clone, PartialEq)]
10710#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10711#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10712#[cfg_attr(feature = "ts", derive(TS))]
10713#[cfg_attr(feature = "ts", ts(export))]
10714pub struct EFI_STATUS_DATA {
10715    #[doc = "ECU index"]
10716    pub ecu_index: f32,
10717    #[doc = "RPM"]
10718    pub rpm: f32,
10719    #[doc = "Fuel consumed"]
10720    pub fuel_consumed: f32,
10721    #[doc = "Fuel flow rate"]
10722    pub fuel_flow: f32,
10723    #[doc = "Engine load"]
10724    pub engine_load: f32,
10725    #[doc = "Throttle position"]
10726    pub throttle_position: f32,
10727    #[doc = "Spark dwell time"]
10728    pub spark_dwell_time: f32,
10729    #[doc = "Barometric pressure"]
10730    pub barometric_pressure: f32,
10731    #[doc = "Intake manifold pressure("]
10732    pub intake_manifold_pressure: f32,
10733    #[doc = "Intake manifold temperature"]
10734    pub intake_manifold_temperature: f32,
10735    #[doc = "Cylinder head temperature"]
10736    pub cylinder_head_temperature: f32,
10737    #[doc = "Ignition timing (Crank angle degrees)"]
10738    pub ignition_timing: f32,
10739    #[doc = "Injection time"]
10740    pub injection_time: f32,
10741    #[doc = "Exhaust gas temperature"]
10742    pub exhaust_gas_temperature: f32,
10743    #[doc = "Output throttle"]
10744    pub throttle_out: f32,
10745    #[doc = "Pressure/temperature compensation"]
10746    pub pt_compensation: f32,
10747    #[doc = "EFI health status"]
10748    pub health: u8,
10749    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
10750    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10751    pub ignition_voltage: f32,
10752    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
10753    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10754    pub fuel_pressure: f32,
10755}
10756impl EFI_STATUS_DATA {
10757    pub const ENCODED_LEN: usize = 73usize;
10758    pub const DEFAULT: Self = Self {
10759        ecu_index: 0.0_f32,
10760        rpm: 0.0_f32,
10761        fuel_consumed: 0.0_f32,
10762        fuel_flow: 0.0_f32,
10763        engine_load: 0.0_f32,
10764        throttle_position: 0.0_f32,
10765        spark_dwell_time: 0.0_f32,
10766        barometric_pressure: 0.0_f32,
10767        intake_manifold_pressure: 0.0_f32,
10768        intake_manifold_temperature: 0.0_f32,
10769        cylinder_head_temperature: 0.0_f32,
10770        ignition_timing: 0.0_f32,
10771        injection_time: 0.0_f32,
10772        exhaust_gas_temperature: 0.0_f32,
10773        throttle_out: 0.0_f32,
10774        pt_compensation: 0.0_f32,
10775        health: 0_u8,
10776        ignition_voltage: 0.0_f32,
10777        fuel_pressure: 0.0_f32,
10778    };
10779    #[cfg(feature = "arbitrary")]
10780    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10781        use arbitrary::{Arbitrary, Unstructured};
10782        let mut buf = [0u8; 1024];
10783        rng.fill_bytes(&mut buf);
10784        let mut unstructured = Unstructured::new(&buf);
10785        Self::arbitrary(&mut unstructured).unwrap_or_default()
10786    }
10787}
10788impl Default for EFI_STATUS_DATA {
10789    fn default() -> Self {
10790        Self::DEFAULT.clone()
10791    }
10792}
10793impl MessageData for EFI_STATUS_DATA {
10794    type Message = MavMessage;
10795    const ID: u32 = 225u32;
10796    const NAME: &'static str = "EFI_STATUS";
10797    const EXTRA_CRC: u8 = 208u8;
10798    const ENCODED_LEN: usize = 73usize;
10799    fn deser(
10800        _version: MavlinkVersion,
10801        __input: &[u8],
10802    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10803        let avail_len = __input.len();
10804        let mut payload_buf = [0; Self::ENCODED_LEN];
10805        let mut buf = if avail_len < Self::ENCODED_LEN {
10806            payload_buf[0..avail_len].copy_from_slice(__input);
10807            Bytes::new(&payload_buf)
10808        } else {
10809            Bytes::new(__input)
10810        };
10811        let mut __struct = Self::default();
10812        __struct.ecu_index = buf.get_f32_le();
10813        __struct.rpm = buf.get_f32_le();
10814        __struct.fuel_consumed = buf.get_f32_le();
10815        __struct.fuel_flow = buf.get_f32_le();
10816        __struct.engine_load = buf.get_f32_le();
10817        __struct.throttle_position = buf.get_f32_le();
10818        __struct.spark_dwell_time = buf.get_f32_le();
10819        __struct.barometric_pressure = buf.get_f32_le();
10820        __struct.intake_manifold_pressure = buf.get_f32_le();
10821        __struct.intake_manifold_temperature = buf.get_f32_le();
10822        __struct.cylinder_head_temperature = buf.get_f32_le();
10823        __struct.ignition_timing = buf.get_f32_le();
10824        __struct.injection_time = buf.get_f32_le();
10825        __struct.exhaust_gas_temperature = buf.get_f32_le();
10826        __struct.throttle_out = buf.get_f32_le();
10827        __struct.pt_compensation = buf.get_f32_le();
10828        __struct.health = buf.get_u8();
10829        __struct.ignition_voltage = buf.get_f32_le();
10830        __struct.fuel_pressure = buf.get_f32_le();
10831        Ok(__struct)
10832    }
10833    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10834        let mut __tmp = BytesMut::new(bytes);
10835        #[allow(clippy::absurd_extreme_comparisons)]
10836        #[allow(unused_comparisons)]
10837        if __tmp.remaining() < Self::ENCODED_LEN {
10838            panic!(
10839                "buffer is too small (need {} bytes, but got {})",
10840                Self::ENCODED_LEN,
10841                __tmp.remaining(),
10842            )
10843        }
10844        __tmp.put_f32_le(self.ecu_index);
10845        __tmp.put_f32_le(self.rpm);
10846        __tmp.put_f32_le(self.fuel_consumed);
10847        __tmp.put_f32_le(self.fuel_flow);
10848        __tmp.put_f32_le(self.engine_load);
10849        __tmp.put_f32_le(self.throttle_position);
10850        __tmp.put_f32_le(self.spark_dwell_time);
10851        __tmp.put_f32_le(self.barometric_pressure);
10852        __tmp.put_f32_le(self.intake_manifold_pressure);
10853        __tmp.put_f32_le(self.intake_manifold_temperature);
10854        __tmp.put_f32_le(self.cylinder_head_temperature);
10855        __tmp.put_f32_le(self.ignition_timing);
10856        __tmp.put_f32_le(self.injection_time);
10857        __tmp.put_f32_le(self.exhaust_gas_temperature);
10858        __tmp.put_f32_le(self.throttle_out);
10859        __tmp.put_f32_le(self.pt_compensation);
10860        __tmp.put_u8(self.health);
10861        if matches!(version, MavlinkVersion::V2) {
10862            __tmp.put_f32_le(self.ignition_voltage);
10863            __tmp.put_f32_le(self.fuel_pressure);
10864            let len = __tmp.len();
10865            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10866        } else {
10867            __tmp.len()
10868        }
10869    }
10870}
10871#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10872#[doc = ""]
10873#[doc = "ID: 131"]
10874#[derive(Debug, Clone, PartialEq)]
10875#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10876#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10877#[cfg_attr(feature = "ts", derive(TS))]
10878#[cfg_attr(feature = "ts", ts(export))]
10879pub struct ENCAPSULATED_DATA_DATA {
10880    #[doc = "sequence number (starting with 0 on every transmission)"]
10881    pub seqnr: u16,
10882    #[doc = "image data bytes"]
10883    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10884    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10885    pub data: [u8; 253],
10886}
10887impl ENCAPSULATED_DATA_DATA {
10888    pub const ENCODED_LEN: usize = 255usize;
10889    pub const DEFAULT: Self = Self {
10890        seqnr: 0_u16,
10891        data: [0_u8; 253usize],
10892    };
10893    #[cfg(feature = "arbitrary")]
10894    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10895        use arbitrary::{Arbitrary, Unstructured};
10896        let mut buf = [0u8; 1024];
10897        rng.fill_bytes(&mut buf);
10898        let mut unstructured = Unstructured::new(&buf);
10899        Self::arbitrary(&mut unstructured).unwrap_or_default()
10900    }
10901}
10902impl Default for ENCAPSULATED_DATA_DATA {
10903    fn default() -> Self {
10904        Self::DEFAULT.clone()
10905    }
10906}
10907impl MessageData for ENCAPSULATED_DATA_DATA {
10908    type Message = MavMessage;
10909    const ID: u32 = 131u32;
10910    const NAME: &'static str = "ENCAPSULATED_DATA";
10911    const EXTRA_CRC: u8 = 223u8;
10912    const ENCODED_LEN: usize = 255usize;
10913    fn deser(
10914        _version: MavlinkVersion,
10915        __input: &[u8],
10916    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10917        let avail_len = __input.len();
10918        let mut payload_buf = [0; Self::ENCODED_LEN];
10919        let mut buf = if avail_len < Self::ENCODED_LEN {
10920            payload_buf[0..avail_len].copy_from_slice(__input);
10921            Bytes::new(&payload_buf)
10922        } else {
10923            Bytes::new(__input)
10924        };
10925        let mut __struct = Self::default();
10926        __struct.seqnr = buf.get_u16_le();
10927        for v in &mut __struct.data {
10928            let val = buf.get_u8();
10929            *v = val;
10930        }
10931        Ok(__struct)
10932    }
10933    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10934        let mut __tmp = BytesMut::new(bytes);
10935        #[allow(clippy::absurd_extreme_comparisons)]
10936        #[allow(unused_comparisons)]
10937        if __tmp.remaining() < Self::ENCODED_LEN {
10938            panic!(
10939                "buffer is too small (need {} bytes, but got {})",
10940                Self::ENCODED_LEN,
10941                __tmp.remaining(),
10942            )
10943        }
10944        __tmp.put_u16_le(self.seqnr);
10945        for val in &self.data {
10946            __tmp.put_u8(*val);
10947        }
10948        if matches!(version, MavlinkVersion::V2) {
10949            let len = __tmp.len();
10950            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10951        } else {
10952            __tmp.len()
10953        }
10954    }
10955}
10956#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
10957#[doc = ""]
10958#[doc = "ID: 290"]
10959#[derive(Debug, Clone, PartialEq)]
10960#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10961#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10962#[cfg_attr(feature = "ts", derive(TS))]
10963#[cfg_attr(feature = "ts", ts(export))]
10964pub struct ESC_INFO_DATA {
10965    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
10966    pub time_usec: u64,
10967    #[doc = "Number of reported errors by each ESC since boot."]
10968    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10969    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10970    pub error_count: [u32; 4],
10971    #[doc = "Counter of data packets received."]
10972    pub counter: u16,
10973    #[doc = "Bitmap of ESC failure flags."]
10974    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10975    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10976    pub failure_flags: [u16; 4],
10977    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
10978    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10979    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10980    pub temperature: [i16; 4],
10981    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
10982    pub index: u8,
10983    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
10984    pub count: u8,
10985    #[doc = "Connection type protocol for all ESC."]
10986    pub connection_type: EscConnectionType,
10987    #[doc = "Information regarding online/offline status of each ESC."]
10988    pub info: u8,
10989}
10990impl ESC_INFO_DATA {
10991    pub const ENCODED_LEN: usize = 46usize;
10992    pub const DEFAULT: Self = Self {
10993        time_usec: 0_u64,
10994        error_count: [0_u32; 4usize],
10995        counter: 0_u16,
10996        failure_flags: [0_u16; 4usize],
10997        temperature: [0_i16; 4usize],
10998        index: 0_u8,
10999        count: 0_u8,
11000        connection_type: EscConnectionType::DEFAULT,
11001        info: 0_u8,
11002    };
11003    #[cfg(feature = "arbitrary")]
11004    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11005        use arbitrary::{Arbitrary, Unstructured};
11006        let mut buf = [0u8; 1024];
11007        rng.fill_bytes(&mut buf);
11008        let mut unstructured = Unstructured::new(&buf);
11009        Self::arbitrary(&mut unstructured).unwrap_or_default()
11010    }
11011}
11012impl Default for ESC_INFO_DATA {
11013    fn default() -> Self {
11014        Self::DEFAULT.clone()
11015    }
11016}
11017impl MessageData for ESC_INFO_DATA {
11018    type Message = MavMessage;
11019    const ID: u32 = 290u32;
11020    const NAME: &'static str = "ESC_INFO";
11021    const EXTRA_CRC: u8 = 251u8;
11022    const ENCODED_LEN: usize = 46usize;
11023    fn deser(
11024        _version: MavlinkVersion,
11025        __input: &[u8],
11026    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11027        let avail_len = __input.len();
11028        let mut payload_buf = [0; Self::ENCODED_LEN];
11029        let mut buf = if avail_len < Self::ENCODED_LEN {
11030            payload_buf[0..avail_len].copy_from_slice(__input);
11031            Bytes::new(&payload_buf)
11032        } else {
11033            Bytes::new(__input)
11034        };
11035        let mut __struct = Self::default();
11036        __struct.time_usec = buf.get_u64_le();
11037        for v in &mut __struct.error_count {
11038            let val = buf.get_u32_le();
11039            *v = val;
11040        }
11041        __struct.counter = buf.get_u16_le();
11042        for v in &mut __struct.failure_flags {
11043            let val = buf.get_u16_le();
11044            *v = val;
11045        }
11046        for v in &mut __struct.temperature {
11047            let val = buf.get_i16_le();
11048            *v = val;
11049        }
11050        __struct.index = buf.get_u8();
11051        __struct.count = buf.get_u8();
11052        let tmp = buf.get_u8();
11053        __struct.connection_type =
11054            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11055                enum_type: "EscConnectionType",
11056                value: tmp as u32,
11057            })?;
11058        __struct.info = buf.get_u8();
11059        Ok(__struct)
11060    }
11061    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11062        let mut __tmp = BytesMut::new(bytes);
11063        #[allow(clippy::absurd_extreme_comparisons)]
11064        #[allow(unused_comparisons)]
11065        if __tmp.remaining() < Self::ENCODED_LEN {
11066            panic!(
11067                "buffer is too small (need {} bytes, but got {})",
11068                Self::ENCODED_LEN,
11069                __tmp.remaining(),
11070            )
11071        }
11072        __tmp.put_u64_le(self.time_usec);
11073        for val in &self.error_count {
11074            __tmp.put_u32_le(*val);
11075        }
11076        __tmp.put_u16_le(self.counter);
11077        for val in &self.failure_flags {
11078            __tmp.put_u16_le(*val);
11079        }
11080        for val in &self.temperature {
11081            __tmp.put_i16_le(*val);
11082        }
11083        __tmp.put_u8(self.index);
11084        __tmp.put_u8(self.count);
11085        __tmp.put_u8(self.connection_type as u8);
11086        __tmp.put_u8(self.info);
11087        if matches!(version, MavlinkVersion::V2) {
11088            let len = __tmp.len();
11089            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11090        } else {
11091            __tmp.len()
11092        }
11093    }
11094}
11095#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
11096#[doc = ""]
11097#[doc = "ID: 291"]
11098#[derive(Debug, Clone, PartialEq)]
11099#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11100#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11101#[cfg_attr(feature = "ts", derive(TS))]
11102#[cfg_attr(feature = "ts", ts(export))]
11103pub struct ESC_STATUS_DATA {
11104    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11105    pub time_usec: u64,
11106    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
11107    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11108    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11109    pub rpm: [i32; 4],
11110    #[doc = "Voltage measured from each ESC."]
11111    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11112    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11113    pub voltage: [f32; 4],
11114    #[doc = "Current measured from each ESC."]
11115    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11116    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11117    pub current: [f32; 4],
11118    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11119    pub index: u8,
11120}
11121impl ESC_STATUS_DATA {
11122    pub const ENCODED_LEN: usize = 57usize;
11123    pub const DEFAULT: Self = Self {
11124        time_usec: 0_u64,
11125        rpm: [0_i32; 4usize],
11126        voltage: [0.0_f32; 4usize],
11127        current: [0.0_f32; 4usize],
11128        index: 0_u8,
11129    };
11130    #[cfg(feature = "arbitrary")]
11131    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11132        use arbitrary::{Arbitrary, Unstructured};
11133        let mut buf = [0u8; 1024];
11134        rng.fill_bytes(&mut buf);
11135        let mut unstructured = Unstructured::new(&buf);
11136        Self::arbitrary(&mut unstructured).unwrap_or_default()
11137    }
11138}
11139impl Default for ESC_STATUS_DATA {
11140    fn default() -> Self {
11141        Self::DEFAULT.clone()
11142    }
11143}
11144impl MessageData for ESC_STATUS_DATA {
11145    type Message = MavMessage;
11146    const ID: u32 = 291u32;
11147    const NAME: &'static str = "ESC_STATUS";
11148    const EXTRA_CRC: u8 = 10u8;
11149    const ENCODED_LEN: usize = 57usize;
11150    fn deser(
11151        _version: MavlinkVersion,
11152        __input: &[u8],
11153    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11154        let avail_len = __input.len();
11155        let mut payload_buf = [0; Self::ENCODED_LEN];
11156        let mut buf = if avail_len < Self::ENCODED_LEN {
11157            payload_buf[0..avail_len].copy_from_slice(__input);
11158            Bytes::new(&payload_buf)
11159        } else {
11160            Bytes::new(__input)
11161        };
11162        let mut __struct = Self::default();
11163        __struct.time_usec = buf.get_u64_le();
11164        for v in &mut __struct.rpm {
11165            let val = buf.get_i32_le();
11166            *v = val;
11167        }
11168        for v in &mut __struct.voltage {
11169            let val = buf.get_f32_le();
11170            *v = val;
11171        }
11172        for v in &mut __struct.current {
11173            let val = buf.get_f32_le();
11174            *v = val;
11175        }
11176        __struct.index = buf.get_u8();
11177        Ok(__struct)
11178    }
11179    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11180        let mut __tmp = BytesMut::new(bytes);
11181        #[allow(clippy::absurd_extreme_comparisons)]
11182        #[allow(unused_comparisons)]
11183        if __tmp.remaining() < Self::ENCODED_LEN {
11184            panic!(
11185                "buffer is too small (need {} bytes, but got {})",
11186                Self::ENCODED_LEN,
11187                __tmp.remaining(),
11188            )
11189        }
11190        __tmp.put_u64_le(self.time_usec);
11191        for val in &self.rpm {
11192            __tmp.put_i32_le(*val);
11193        }
11194        for val in &self.voltage {
11195            __tmp.put_f32_le(*val);
11196        }
11197        for val in &self.current {
11198            __tmp.put_f32_le(*val);
11199        }
11200        __tmp.put_u8(self.index);
11201        if matches!(version, MavlinkVersion::V2) {
11202            let len = __tmp.len();
11203            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11204        } else {
11205            __tmp.len()
11206        }
11207    }
11208}
11209#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
11210#[doc = ""]
11211#[doc = "ID: 230"]
11212#[derive(Debug, Clone, PartialEq)]
11213#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11214#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11215#[cfg_attr(feature = "ts", derive(TS))]
11216#[cfg_attr(feature = "ts", ts(export))]
11217pub struct ESTIMATOR_STATUS_DATA {
11218    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11219    pub time_usec: u64,
11220    #[doc = "Velocity innovation test ratio"]
11221    pub vel_ratio: f32,
11222    #[doc = "Horizontal position innovation test ratio"]
11223    pub pos_horiz_ratio: f32,
11224    #[doc = "Vertical position innovation test ratio"]
11225    pub pos_vert_ratio: f32,
11226    #[doc = "Magnetometer innovation test ratio"]
11227    pub mag_ratio: f32,
11228    #[doc = "Height above terrain innovation test ratio"]
11229    pub hagl_ratio: f32,
11230    #[doc = "True airspeed innovation test ratio"]
11231    pub tas_ratio: f32,
11232    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
11233    pub pos_horiz_accuracy: f32,
11234    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
11235    pub pos_vert_accuracy: f32,
11236    #[doc = "Bitmap indicating which EKF outputs are valid."]
11237    pub flags: EstimatorStatusFlags,
11238}
11239impl ESTIMATOR_STATUS_DATA {
11240    pub const ENCODED_LEN: usize = 42usize;
11241    pub const DEFAULT: Self = Self {
11242        time_usec: 0_u64,
11243        vel_ratio: 0.0_f32,
11244        pos_horiz_ratio: 0.0_f32,
11245        pos_vert_ratio: 0.0_f32,
11246        mag_ratio: 0.0_f32,
11247        hagl_ratio: 0.0_f32,
11248        tas_ratio: 0.0_f32,
11249        pos_horiz_accuracy: 0.0_f32,
11250        pos_vert_accuracy: 0.0_f32,
11251        flags: EstimatorStatusFlags::DEFAULT,
11252    };
11253    #[cfg(feature = "arbitrary")]
11254    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11255        use arbitrary::{Arbitrary, Unstructured};
11256        let mut buf = [0u8; 1024];
11257        rng.fill_bytes(&mut buf);
11258        let mut unstructured = Unstructured::new(&buf);
11259        Self::arbitrary(&mut unstructured).unwrap_or_default()
11260    }
11261}
11262impl Default for ESTIMATOR_STATUS_DATA {
11263    fn default() -> Self {
11264        Self::DEFAULT.clone()
11265    }
11266}
11267impl MessageData for ESTIMATOR_STATUS_DATA {
11268    type Message = MavMessage;
11269    const ID: u32 = 230u32;
11270    const NAME: &'static str = "ESTIMATOR_STATUS";
11271    const EXTRA_CRC: u8 = 163u8;
11272    const ENCODED_LEN: usize = 42usize;
11273    fn deser(
11274        _version: MavlinkVersion,
11275        __input: &[u8],
11276    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11277        let avail_len = __input.len();
11278        let mut payload_buf = [0; Self::ENCODED_LEN];
11279        let mut buf = if avail_len < Self::ENCODED_LEN {
11280            payload_buf[0..avail_len].copy_from_slice(__input);
11281            Bytes::new(&payload_buf)
11282        } else {
11283            Bytes::new(__input)
11284        };
11285        let mut __struct = Self::default();
11286        __struct.time_usec = buf.get_u64_le();
11287        __struct.vel_ratio = buf.get_f32_le();
11288        __struct.pos_horiz_ratio = buf.get_f32_le();
11289        __struct.pos_vert_ratio = buf.get_f32_le();
11290        __struct.mag_ratio = buf.get_f32_le();
11291        __struct.hagl_ratio = buf.get_f32_le();
11292        __struct.tas_ratio = buf.get_f32_le();
11293        __struct.pos_horiz_accuracy = buf.get_f32_le();
11294        __struct.pos_vert_accuracy = buf.get_f32_le();
11295        let tmp = buf.get_u16_le();
11296        __struct.flags = EstimatorStatusFlags::from_bits(tmp & EstimatorStatusFlags::all().bits())
11297            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11298                flag_type: "EstimatorStatusFlags",
11299                value: tmp as u32,
11300            })?;
11301        Ok(__struct)
11302    }
11303    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11304        let mut __tmp = BytesMut::new(bytes);
11305        #[allow(clippy::absurd_extreme_comparisons)]
11306        #[allow(unused_comparisons)]
11307        if __tmp.remaining() < Self::ENCODED_LEN {
11308            panic!(
11309                "buffer is too small (need {} bytes, but got {})",
11310                Self::ENCODED_LEN,
11311                __tmp.remaining(),
11312            )
11313        }
11314        __tmp.put_u64_le(self.time_usec);
11315        __tmp.put_f32_le(self.vel_ratio);
11316        __tmp.put_f32_le(self.pos_horiz_ratio);
11317        __tmp.put_f32_le(self.pos_vert_ratio);
11318        __tmp.put_f32_le(self.mag_ratio);
11319        __tmp.put_f32_le(self.hagl_ratio);
11320        __tmp.put_f32_le(self.tas_ratio);
11321        __tmp.put_f32_le(self.pos_horiz_accuracy);
11322        __tmp.put_f32_le(self.pos_vert_accuracy);
11323        __tmp.put_u16_le(self.flags.bits());
11324        if matches!(version, MavlinkVersion::V2) {
11325            let len = __tmp.len();
11326            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11327        } else {
11328            __tmp.len()
11329        }
11330    }
11331}
11332#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11333#[doc = ""]
11334#[doc = "ID: 410"]
11335#[derive(Debug, Clone, PartialEq)]
11336#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11337#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11338#[cfg_attr(feature = "ts", derive(TS))]
11339#[cfg_attr(feature = "ts", ts(export))]
11340pub struct EVENT_DATA {
11341    #[doc = "Event ID (as defined in the component metadata)"]
11342    pub id: u32,
11343    #[doc = "Timestamp (time since system boot when the event happened)."]
11344    pub event_time_boot_ms: u32,
11345    #[doc = "Sequence number."]
11346    pub sequence: u16,
11347    #[doc = "Component ID"]
11348    pub destination_component: u8,
11349    #[doc = "System ID"]
11350    pub destination_system: u8,
11351    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11352    pub log_levels: u8,
11353    #[doc = "Arguments (depend on event ID)."]
11354    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11355    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11356    pub arguments: [u8; 40],
11357}
11358impl EVENT_DATA {
11359    pub const ENCODED_LEN: usize = 53usize;
11360    pub const DEFAULT: Self = Self {
11361        id: 0_u32,
11362        event_time_boot_ms: 0_u32,
11363        sequence: 0_u16,
11364        destination_component: 0_u8,
11365        destination_system: 0_u8,
11366        log_levels: 0_u8,
11367        arguments: [0_u8; 40usize],
11368    };
11369    #[cfg(feature = "arbitrary")]
11370    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11371        use arbitrary::{Arbitrary, Unstructured};
11372        let mut buf = [0u8; 1024];
11373        rng.fill_bytes(&mut buf);
11374        let mut unstructured = Unstructured::new(&buf);
11375        Self::arbitrary(&mut unstructured).unwrap_or_default()
11376    }
11377}
11378impl Default for EVENT_DATA {
11379    fn default() -> Self {
11380        Self::DEFAULT.clone()
11381    }
11382}
11383impl MessageData for EVENT_DATA {
11384    type Message = MavMessage;
11385    const ID: u32 = 410u32;
11386    const NAME: &'static str = "EVENT";
11387    const EXTRA_CRC: u8 = 160u8;
11388    const ENCODED_LEN: usize = 53usize;
11389    fn deser(
11390        _version: MavlinkVersion,
11391        __input: &[u8],
11392    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11393        let avail_len = __input.len();
11394        let mut payload_buf = [0; Self::ENCODED_LEN];
11395        let mut buf = if avail_len < Self::ENCODED_LEN {
11396            payload_buf[0..avail_len].copy_from_slice(__input);
11397            Bytes::new(&payload_buf)
11398        } else {
11399            Bytes::new(__input)
11400        };
11401        let mut __struct = Self::default();
11402        __struct.id = buf.get_u32_le();
11403        __struct.event_time_boot_ms = buf.get_u32_le();
11404        __struct.sequence = buf.get_u16_le();
11405        __struct.destination_component = buf.get_u8();
11406        __struct.destination_system = buf.get_u8();
11407        __struct.log_levels = buf.get_u8();
11408        for v in &mut __struct.arguments {
11409            let val = buf.get_u8();
11410            *v = val;
11411        }
11412        Ok(__struct)
11413    }
11414    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11415        let mut __tmp = BytesMut::new(bytes);
11416        #[allow(clippy::absurd_extreme_comparisons)]
11417        #[allow(unused_comparisons)]
11418        if __tmp.remaining() < Self::ENCODED_LEN {
11419            panic!(
11420                "buffer is too small (need {} bytes, but got {})",
11421                Self::ENCODED_LEN,
11422                __tmp.remaining(),
11423            )
11424        }
11425        __tmp.put_u32_le(self.id);
11426        __tmp.put_u32_le(self.event_time_boot_ms);
11427        __tmp.put_u16_le(self.sequence);
11428        __tmp.put_u8(self.destination_component);
11429        __tmp.put_u8(self.destination_system);
11430        __tmp.put_u8(self.log_levels);
11431        for val in &self.arguments {
11432            __tmp.put_u8(*val);
11433        }
11434        if matches!(version, MavlinkVersion::V2) {
11435            let len = __tmp.len();
11436            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11437        } else {
11438            __tmp.len()
11439        }
11440    }
11441}
11442#[doc = "Provides state for additional features."]
11443#[doc = ""]
11444#[doc = "ID: 245"]
11445#[derive(Debug, Clone, PartialEq)]
11446#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11447#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11448#[cfg_attr(feature = "ts", derive(TS))]
11449#[cfg_attr(feature = "ts", ts(export))]
11450pub struct EXTENDED_SYS_STATE_DATA {
11451    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11452    pub vtol_state: MavVtolState,
11453    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11454    pub landed_state: MavLandedState,
11455}
11456impl EXTENDED_SYS_STATE_DATA {
11457    pub const ENCODED_LEN: usize = 2usize;
11458    pub const DEFAULT: Self = Self {
11459        vtol_state: MavVtolState::DEFAULT,
11460        landed_state: MavLandedState::DEFAULT,
11461    };
11462    #[cfg(feature = "arbitrary")]
11463    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11464        use arbitrary::{Arbitrary, Unstructured};
11465        let mut buf = [0u8; 1024];
11466        rng.fill_bytes(&mut buf);
11467        let mut unstructured = Unstructured::new(&buf);
11468        Self::arbitrary(&mut unstructured).unwrap_or_default()
11469    }
11470}
11471impl Default for EXTENDED_SYS_STATE_DATA {
11472    fn default() -> Self {
11473        Self::DEFAULT.clone()
11474    }
11475}
11476impl MessageData for EXTENDED_SYS_STATE_DATA {
11477    type Message = MavMessage;
11478    const ID: u32 = 245u32;
11479    const NAME: &'static str = "EXTENDED_SYS_STATE";
11480    const EXTRA_CRC: u8 = 130u8;
11481    const ENCODED_LEN: usize = 2usize;
11482    fn deser(
11483        _version: MavlinkVersion,
11484        __input: &[u8],
11485    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11486        let avail_len = __input.len();
11487        let mut payload_buf = [0; Self::ENCODED_LEN];
11488        let mut buf = if avail_len < Self::ENCODED_LEN {
11489            payload_buf[0..avail_len].copy_from_slice(__input);
11490            Bytes::new(&payload_buf)
11491        } else {
11492            Bytes::new(__input)
11493        };
11494        let mut __struct = Self::default();
11495        let tmp = buf.get_u8();
11496        __struct.vtol_state =
11497            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11498                enum_type: "MavVtolState",
11499                value: tmp as u32,
11500            })?;
11501        let tmp = buf.get_u8();
11502        __struct.landed_state =
11503            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11504                enum_type: "MavLandedState",
11505                value: tmp as u32,
11506            })?;
11507        Ok(__struct)
11508    }
11509    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11510        let mut __tmp = BytesMut::new(bytes);
11511        #[allow(clippy::absurd_extreme_comparisons)]
11512        #[allow(unused_comparisons)]
11513        if __tmp.remaining() < Self::ENCODED_LEN {
11514            panic!(
11515                "buffer is too small (need {} bytes, but got {})",
11516                Self::ENCODED_LEN,
11517                __tmp.remaining(),
11518            )
11519        }
11520        __tmp.put_u8(self.vtol_state as u8);
11521        __tmp.put_u8(self.landed_state as u8);
11522        if matches!(version, MavlinkVersion::V2) {
11523            let len = __tmp.len();
11524            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11525        } else {
11526            __tmp.len()
11527        }
11528    }
11529}
11530#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
11531#[doc = ""]
11532#[doc = "ID: 162"]
11533#[derive(Debug, Clone, PartialEq)]
11534#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11535#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11536#[cfg_attr(feature = "ts", derive(TS))]
11537#[cfg_attr(feature = "ts", ts(export))]
11538pub struct FENCE_STATUS_DATA {
11539    #[doc = "Time (since boot) of last breach."]
11540    pub breach_time: u32,
11541    #[doc = "Number of fence breaches."]
11542    pub breach_count: u16,
11543    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
11544    pub breach_status: u8,
11545    #[doc = "Last breach type."]
11546    pub breach_type: FenceBreach,
11547    #[doc = "Active action to prevent fence breach"]
11548    #[cfg_attr(feature = "serde", serde(default))]
11549    pub breach_mitigation: FenceMitigate,
11550}
11551impl FENCE_STATUS_DATA {
11552    pub const ENCODED_LEN: usize = 9usize;
11553    pub const DEFAULT: Self = Self {
11554        breach_time: 0_u32,
11555        breach_count: 0_u16,
11556        breach_status: 0_u8,
11557        breach_type: FenceBreach::DEFAULT,
11558        breach_mitigation: FenceMitigate::DEFAULT,
11559    };
11560    #[cfg(feature = "arbitrary")]
11561    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11562        use arbitrary::{Arbitrary, Unstructured};
11563        let mut buf = [0u8; 1024];
11564        rng.fill_bytes(&mut buf);
11565        let mut unstructured = Unstructured::new(&buf);
11566        Self::arbitrary(&mut unstructured).unwrap_or_default()
11567    }
11568}
11569impl Default for FENCE_STATUS_DATA {
11570    fn default() -> Self {
11571        Self::DEFAULT.clone()
11572    }
11573}
11574impl MessageData for FENCE_STATUS_DATA {
11575    type Message = MavMessage;
11576    const ID: u32 = 162u32;
11577    const NAME: &'static str = "FENCE_STATUS";
11578    const EXTRA_CRC: u8 = 189u8;
11579    const ENCODED_LEN: usize = 9usize;
11580    fn deser(
11581        _version: MavlinkVersion,
11582        __input: &[u8],
11583    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11584        let avail_len = __input.len();
11585        let mut payload_buf = [0; Self::ENCODED_LEN];
11586        let mut buf = if avail_len < Self::ENCODED_LEN {
11587            payload_buf[0..avail_len].copy_from_slice(__input);
11588            Bytes::new(&payload_buf)
11589        } else {
11590            Bytes::new(__input)
11591        };
11592        let mut __struct = Self::default();
11593        __struct.breach_time = buf.get_u32_le();
11594        __struct.breach_count = buf.get_u16_le();
11595        __struct.breach_status = buf.get_u8();
11596        let tmp = buf.get_u8();
11597        __struct.breach_type =
11598            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11599                enum_type: "FenceBreach",
11600                value: tmp as u32,
11601            })?;
11602        let tmp = buf.get_u8();
11603        __struct.breach_mitigation =
11604            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11605                enum_type: "FenceMitigate",
11606                value: tmp as u32,
11607            })?;
11608        Ok(__struct)
11609    }
11610    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11611        let mut __tmp = BytesMut::new(bytes);
11612        #[allow(clippy::absurd_extreme_comparisons)]
11613        #[allow(unused_comparisons)]
11614        if __tmp.remaining() < Self::ENCODED_LEN {
11615            panic!(
11616                "buffer is too small (need {} bytes, but got {})",
11617                Self::ENCODED_LEN,
11618                __tmp.remaining(),
11619            )
11620        }
11621        __tmp.put_u32_le(self.breach_time);
11622        __tmp.put_u16_le(self.breach_count);
11623        __tmp.put_u8(self.breach_status);
11624        __tmp.put_u8(self.breach_type as u8);
11625        if matches!(version, MavlinkVersion::V2) {
11626            __tmp.put_u8(self.breach_mitigation as u8);
11627            let len = __tmp.len();
11628            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11629        } else {
11630            __tmp.len()
11631        }
11632    }
11633}
11634#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
11635#[doc = ""]
11636#[doc = "ID: 110"]
11637#[derive(Debug, Clone, PartialEq)]
11638#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11639#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11640#[cfg_attr(feature = "ts", derive(TS))]
11641#[cfg_attr(feature = "ts", ts(export))]
11642pub struct FILE_TRANSFER_PROTOCOL_DATA {
11643    #[doc = "Network ID (0 for broadcast)"]
11644    pub target_network: u8,
11645    #[doc = "System ID (0 for broadcast)"]
11646    pub target_system: u8,
11647    #[doc = "Component ID (0 for broadcast)"]
11648    pub target_component: u8,
11649    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
11650    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11651    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11652    pub payload: [u8; 251],
11653}
11654impl FILE_TRANSFER_PROTOCOL_DATA {
11655    pub const ENCODED_LEN: usize = 254usize;
11656    pub const DEFAULT: Self = Self {
11657        target_network: 0_u8,
11658        target_system: 0_u8,
11659        target_component: 0_u8,
11660        payload: [0_u8; 251usize],
11661    };
11662    #[cfg(feature = "arbitrary")]
11663    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11664        use arbitrary::{Arbitrary, Unstructured};
11665        let mut buf = [0u8; 1024];
11666        rng.fill_bytes(&mut buf);
11667        let mut unstructured = Unstructured::new(&buf);
11668        Self::arbitrary(&mut unstructured).unwrap_or_default()
11669    }
11670}
11671impl Default for FILE_TRANSFER_PROTOCOL_DATA {
11672    fn default() -> Self {
11673        Self::DEFAULT.clone()
11674    }
11675}
11676impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
11677    type Message = MavMessage;
11678    const ID: u32 = 110u32;
11679    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
11680    const EXTRA_CRC: u8 = 84u8;
11681    const ENCODED_LEN: usize = 254usize;
11682    fn deser(
11683        _version: MavlinkVersion,
11684        __input: &[u8],
11685    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11686        let avail_len = __input.len();
11687        let mut payload_buf = [0; Self::ENCODED_LEN];
11688        let mut buf = if avail_len < Self::ENCODED_LEN {
11689            payload_buf[0..avail_len].copy_from_slice(__input);
11690            Bytes::new(&payload_buf)
11691        } else {
11692            Bytes::new(__input)
11693        };
11694        let mut __struct = Self::default();
11695        __struct.target_network = buf.get_u8();
11696        __struct.target_system = buf.get_u8();
11697        __struct.target_component = buf.get_u8();
11698        for v in &mut __struct.payload {
11699            let val = buf.get_u8();
11700            *v = val;
11701        }
11702        Ok(__struct)
11703    }
11704    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11705        let mut __tmp = BytesMut::new(bytes);
11706        #[allow(clippy::absurd_extreme_comparisons)]
11707        #[allow(unused_comparisons)]
11708        if __tmp.remaining() < Self::ENCODED_LEN {
11709            panic!(
11710                "buffer is too small (need {} bytes, but got {})",
11711                Self::ENCODED_LEN,
11712                __tmp.remaining(),
11713            )
11714        }
11715        __tmp.put_u8(self.target_network);
11716        __tmp.put_u8(self.target_system);
11717        __tmp.put_u8(self.target_component);
11718        for val in &self.payload {
11719            __tmp.put_u8(*val);
11720        }
11721        if matches!(version, MavlinkVersion::V2) {
11722            let len = __tmp.len();
11723            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11724        } else {
11725            __tmp.len()
11726        }
11727    }
11728}
11729#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
11730#[doc = ""]
11731#[doc = "ID: 264"]
11732#[derive(Debug, Clone, PartialEq)]
11733#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11734#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11735#[cfg_attr(feature = "ts", derive(TS))]
11736#[cfg_attr(feature = "ts", ts(export))]
11737pub struct FLIGHT_INFORMATION_DATA {
11738    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
11739    pub arming_time_utc: u64,
11740    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
11741    pub takeoff_time_utc: u64,
11742    #[doc = "Flight number. Note, field is misnamed UUID."]
11743    pub flight_uuid: u64,
11744    #[doc = "Timestamp (time since system boot)."]
11745    pub time_boot_ms: u32,
11746    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
11747    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11748    pub landing_time: u32,
11749}
11750impl FLIGHT_INFORMATION_DATA {
11751    pub const ENCODED_LEN: usize = 32usize;
11752    pub const DEFAULT: Self = Self {
11753        arming_time_utc: 0_u64,
11754        takeoff_time_utc: 0_u64,
11755        flight_uuid: 0_u64,
11756        time_boot_ms: 0_u32,
11757        landing_time: 0_u32,
11758    };
11759    #[cfg(feature = "arbitrary")]
11760    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11761        use arbitrary::{Arbitrary, Unstructured};
11762        let mut buf = [0u8; 1024];
11763        rng.fill_bytes(&mut buf);
11764        let mut unstructured = Unstructured::new(&buf);
11765        Self::arbitrary(&mut unstructured).unwrap_or_default()
11766    }
11767}
11768impl Default for FLIGHT_INFORMATION_DATA {
11769    fn default() -> Self {
11770        Self::DEFAULT.clone()
11771    }
11772}
11773impl MessageData for FLIGHT_INFORMATION_DATA {
11774    type Message = MavMessage;
11775    const ID: u32 = 264u32;
11776    const NAME: &'static str = "FLIGHT_INFORMATION";
11777    const EXTRA_CRC: u8 = 49u8;
11778    const ENCODED_LEN: usize = 32usize;
11779    fn deser(
11780        _version: MavlinkVersion,
11781        __input: &[u8],
11782    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11783        let avail_len = __input.len();
11784        let mut payload_buf = [0; Self::ENCODED_LEN];
11785        let mut buf = if avail_len < Self::ENCODED_LEN {
11786            payload_buf[0..avail_len].copy_from_slice(__input);
11787            Bytes::new(&payload_buf)
11788        } else {
11789            Bytes::new(__input)
11790        };
11791        let mut __struct = Self::default();
11792        __struct.arming_time_utc = buf.get_u64_le();
11793        __struct.takeoff_time_utc = buf.get_u64_le();
11794        __struct.flight_uuid = buf.get_u64_le();
11795        __struct.time_boot_ms = buf.get_u32_le();
11796        __struct.landing_time = buf.get_u32_le();
11797        Ok(__struct)
11798    }
11799    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11800        let mut __tmp = BytesMut::new(bytes);
11801        #[allow(clippy::absurd_extreme_comparisons)]
11802        #[allow(unused_comparisons)]
11803        if __tmp.remaining() < Self::ENCODED_LEN {
11804            panic!(
11805                "buffer is too small (need {} bytes, but got {})",
11806                Self::ENCODED_LEN,
11807                __tmp.remaining(),
11808            )
11809        }
11810        __tmp.put_u64_le(self.arming_time_utc);
11811        __tmp.put_u64_le(self.takeoff_time_utc);
11812        __tmp.put_u64_le(self.flight_uuid);
11813        __tmp.put_u32_le(self.time_boot_ms);
11814        if matches!(version, MavlinkVersion::V2) {
11815            __tmp.put_u32_le(self.landing_time);
11816            let len = __tmp.len();
11817            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11818        } else {
11819            __tmp.len()
11820        }
11821    }
11822}
11823#[doc = "Current motion information from a designated system."]
11824#[doc = ""]
11825#[doc = "ID: 144"]
11826#[derive(Debug, Clone, PartialEq)]
11827#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11828#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11829#[cfg_attr(feature = "ts", derive(TS))]
11830#[cfg_attr(feature = "ts", ts(export))]
11831pub struct FOLLOW_TARGET_DATA {
11832    #[doc = "Timestamp (time since system boot)."]
11833    pub timestamp: u64,
11834    #[doc = "button states or switches of a tracker device"]
11835    pub custom_state: u64,
11836    #[doc = "Latitude (WGS84)"]
11837    pub lat: i32,
11838    #[doc = "Longitude (WGS84)"]
11839    pub lon: i32,
11840    #[doc = "Altitude (MSL)"]
11841    pub alt: f32,
11842    #[doc = "target velocity (0,0,0) for unknown"]
11843    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11844    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11845    pub vel: [f32; 3],
11846    #[doc = "linear target acceleration (0,0,0) for unknown"]
11847    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11848    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11849    pub acc: [f32; 3],
11850    #[doc = "(0 0 0 0 for unknown)"]
11851    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11852    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11853    pub attitude_q: [f32; 4],
11854    #[doc = "(0 0 0 for unknown)"]
11855    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11856    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11857    pub rates: [f32; 3],
11858    #[doc = "eph epv"]
11859    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11860    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11861    pub position_cov: [f32; 3],
11862    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
11863    pub est_capabilities: u8,
11864}
11865impl FOLLOW_TARGET_DATA {
11866    pub const ENCODED_LEN: usize = 93usize;
11867    pub const DEFAULT: Self = Self {
11868        timestamp: 0_u64,
11869        custom_state: 0_u64,
11870        lat: 0_i32,
11871        lon: 0_i32,
11872        alt: 0.0_f32,
11873        vel: [0.0_f32; 3usize],
11874        acc: [0.0_f32; 3usize],
11875        attitude_q: [0.0_f32; 4usize],
11876        rates: [0.0_f32; 3usize],
11877        position_cov: [0.0_f32; 3usize],
11878        est_capabilities: 0_u8,
11879    };
11880    #[cfg(feature = "arbitrary")]
11881    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11882        use arbitrary::{Arbitrary, Unstructured};
11883        let mut buf = [0u8; 1024];
11884        rng.fill_bytes(&mut buf);
11885        let mut unstructured = Unstructured::new(&buf);
11886        Self::arbitrary(&mut unstructured).unwrap_or_default()
11887    }
11888}
11889impl Default for FOLLOW_TARGET_DATA {
11890    fn default() -> Self {
11891        Self::DEFAULT.clone()
11892    }
11893}
11894impl MessageData for FOLLOW_TARGET_DATA {
11895    type Message = MavMessage;
11896    const ID: u32 = 144u32;
11897    const NAME: &'static str = "FOLLOW_TARGET";
11898    const EXTRA_CRC: u8 = 127u8;
11899    const ENCODED_LEN: usize = 93usize;
11900    fn deser(
11901        _version: MavlinkVersion,
11902        __input: &[u8],
11903    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11904        let avail_len = __input.len();
11905        let mut payload_buf = [0; Self::ENCODED_LEN];
11906        let mut buf = if avail_len < Self::ENCODED_LEN {
11907            payload_buf[0..avail_len].copy_from_slice(__input);
11908            Bytes::new(&payload_buf)
11909        } else {
11910            Bytes::new(__input)
11911        };
11912        let mut __struct = Self::default();
11913        __struct.timestamp = buf.get_u64_le();
11914        __struct.custom_state = buf.get_u64_le();
11915        __struct.lat = buf.get_i32_le();
11916        __struct.lon = buf.get_i32_le();
11917        __struct.alt = buf.get_f32_le();
11918        for v in &mut __struct.vel {
11919            let val = buf.get_f32_le();
11920            *v = val;
11921        }
11922        for v in &mut __struct.acc {
11923            let val = buf.get_f32_le();
11924            *v = val;
11925        }
11926        for v in &mut __struct.attitude_q {
11927            let val = buf.get_f32_le();
11928            *v = val;
11929        }
11930        for v in &mut __struct.rates {
11931            let val = buf.get_f32_le();
11932            *v = val;
11933        }
11934        for v in &mut __struct.position_cov {
11935            let val = buf.get_f32_le();
11936            *v = val;
11937        }
11938        __struct.est_capabilities = buf.get_u8();
11939        Ok(__struct)
11940    }
11941    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11942        let mut __tmp = BytesMut::new(bytes);
11943        #[allow(clippy::absurd_extreme_comparisons)]
11944        #[allow(unused_comparisons)]
11945        if __tmp.remaining() < Self::ENCODED_LEN {
11946            panic!(
11947                "buffer is too small (need {} bytes, but got {})",
11948                Self::ENCODED_LEN,
11949                __tmp.remaining(),
11950            )
11951        }
11952        __tmp.put_u64_le(self.timestamp);
11953        __tmp.put_u64_le(self.custom_state);
11954        __tmp.put_i32_le(self.lat);
11955        __tmp.put_i32_le(self.lon);
11956        __tmp.put_f32_le(self.alt);
11957        for val in &self.vel {
11958            __tmp.put_f32_le(*val);
11959        }
11960        for val in &self.acc {
11961            __tmp.put_f32_le(*val);
11962        }
11963        for val in &self.attitude_q {
11964            __tmp.put_f32_le(*val);
11965        }
11966        for val in &self.rates {
11967            __tmp.put_f32_le(*val);
11968        }
11969        for val in &self.position_cov {
11970            __tmp.put_f32_le(*val);
11971        }
11972        __tmp.put_u8(self.est_capabilities);
11973        if matches!(version, MavlinkVersion::V2) {
11974            let len = __tmp.len();
11975            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11976        } else {
11977            __tmp.len()
11978        }
11979    }
11980}
11981#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
11982#[doc = ""]
11983#[doc = "ID: 371"]
11984#[derive(Debug, Clone, PartialEq)]
11985#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11986#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11987#[cfg_attr(feature = "ts", derive(TS))]
11988#[cfg_attr(feature = "ts", ts(export))]
11989pub struct FUEL_STATUS_DATA {
11990    #[doc = "Capacity when full. Must be provided."]
11991    pub maximum_fuel: f32,
11992    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
11993    pub consumed_fuel: f32,
11994    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
11995    pub remaining_fuel: f32,
11996    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
11997    pub flow_rate: f32,
11998    #[doc = "Fuel temperature. NaN: field not provided."]
11999    pub temperature: f32,
12000    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12001    pub fuel_type: MavFuelType,
12002    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12003    pub id: u8,
12004    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12005    pub percent_remaining: u8,
12006}
12007impl FUEL_STATUS_DATA {
12008    pub const ENCODED_LEN: usize = 26usize;
12009    pub const DEFAULT: Self = Self {
12010        maximum_fuel: 0.0_f32,
12011        consumed_fuel: 0.0_f32,
12012        remaining_fuel: 0.0_f32,
12013        flow_rate: 0.0_f32,
12014        temperature: 0.0_f32,
12015        fuel_type: MavFuelType::DEFAULT,
12016        id: 0_u8,
12017        percent_remaining: 0_u8,
12018    };
12019    #[cfg(feature = "arbitrary")]
12020    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12021        use arbitrary::{Arbitrary, Unstructured};
12022        let mut buf = [0u8; 1024];
12023        rng.fill_bytes(&mut buf);
12024        let mut unstructured = Unstructured::new(&buf);
12025        Self::arbitrary(&mut unstructured).unwrap_or_default()
12026    }
12027}
12028impl Default for FUEL_STATUS_DATA {
12029    fn default() -> Self {
12030        Self::DEFAULT.clone()
12031    }
12032}
12033impl MessageData for FUEL_STATUS_DATA {
12034    type Message = MavMessage;
12035    const ID: u32 = 371u32;
12036    const NAME: &'static str = "FUEL_STATUS";
12037    const EXTRA_CRC: u8 = 10u8;
12038    const ENCODED_LEN: usize = 26usize;
12039    fn deser(
12040        _version: MavlinkVersion,
12041        __input: &[u8],
12042    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12043        let avail_len = __input.len();
12044        let mut payload_buf = [0; Self::ENCODED_LEN];
12045        let mut buf = if avail_len < Self::ENCODED_LEN {
12046            payload_buf[0..avail_len].copy_from_slice(__input);
12047            Bytes::new(&payload_buf)
12048        } else {
12049            Bytes::new(__input)
12050        };
12051        let mut __struct = Self::default();
12052        __struct.maximum_fuel = buf.get_f32_le();
12053        __struct.consumed_fuel = buf.get_f32_le();
12054        __struct.remaining_fuel = buf.get_f32_le();
12055        __struct.flow_rate = buf.get_f32_le();
12056        __struct.temperature = buf.get_f32_le();
12057        let tmp = buf.get_u32_le();
12058        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12059            ::mavlink_core::error::ParserError::InvalidEnum {
12060                enum_type: "MavFuelType",
12061                value: tmp as u32,
12062            },
12063        )?;
12064        __struct.id = buf.get_u8();
12065        __struct.percent_remaining = buf.get_u8();
12066        Ok(__struct)
12067    }
12068    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12069        let mut __tmp = BytesMut::new(bytes);
12070        #[allow(clippy::absurd_extreme_comparisons)]
12071        #[allow(unused_comparisons)]
12072        if __tmp.remaining() < Self::ENCODED_LEN {
12073            panic!(
12074                "buffer is too small (need {} bytes, but got {})",
12075                Self::ENCODED_LEN,
12076                __tmp.remaining(),
12077            )
12078        }
12079        __tmp.put_f32_le(self.maximum_fuel);
12080        __tmp.put_f32_le(self.consumed_fuel);
12081        __tmp.put_f32_le(self.remaining_fuel);
12082        __tmp.put_f32_le(self.flow_rate);
12083        __tmp.put_f32_le(self.temperature);
12084        __tmp.put_u32_le(self.fuel_type as u32);
12085        __tmp.put_u8(self.id);
12086        __tmp.put_u8(self.percent_remaining);
12087        if matches!(version, MavlinkVersion::V2) {
12088            let len = __tmp.len();
12089            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12090        } else {
12091            __tmp.len()
12092        }
12093    }
12094}
12095#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
12096#[doc = ""]
12097#[doc = "ID: 373"]
12098#[derive(Debug, Clone, PartialEq)]
12099#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12100#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12101#[cfg_attr(feature = "ts", derive(TS))]
12102#[cfg_attr(feature = "ts", ts(export))]
12103pub struct GENERATOR_STATUS_DATA {
12104    #[doc = "Status flags."]
12105    pub status: MavGeneratorStatusFlag,
12106    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
12107    pub battery_current: f32,
12108    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
12109    pub load_current: f32,
12110    #[doc = "The power being generated. NaN: field not provided"]
12111    pub power_generated: f32,
12112    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
12113    pub bus_voltage: f32,
12114    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
12115    pub bat_current_setpoint: f32,
12116    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
12117    pub runtime: u32,
12118    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
12119    pub time_until_maintenance: i32,
12120    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
12121    pub generator_speed: u16,
12122    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
12123    pub rectifier_temperature: i16,
12124    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
12125    pub generator_temperature: i16,
12126}
12127impl GENERATOR_STATUS_DATA {
12128    pub const ENCODED_LEN: usize = 42usize;
12129    pub const DEFAULT: Self = Self {
12130        status: MavGeneratorStatusFlag::DEFAULT,
12131        battery_current: 0.0_f32,
12132        load_current: 0.0_f32,
12133        power_generated: 0.0_f32,
12134        bus_voltage: 0.0_f32,
12135        bat_current_setpoint: 0.0_f32,
12136        runtime: 0_u32,
12137        time_until_maintenance: 0_i32,
12138        generator_speed: 0_u16,
12139        rectifier_temperature: 0_i16,
12140        generator_temperature: 0_i16,
12141    };
12142    #[cfg(feature = "arbitrary")]
12143    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12144        use arbitrary::{Arbitrary, Unstructured};
12145        let mut buf = [0u8; 1024];
12146        rng.fill_bytes(&mut buf);
12147        let mut unstructured = Unstructured::new(&buf);
12148        Self::arbitrary(&mut unstructured).unwrap_or_default()
12149    }
12150}
12151impl Default for GENERATOR_STATUS_DATA {
12152    fn default() -> Self {
12153        Self::DEFAULT.clone()
12154    }
12155}
12156impl MessageData for GENERATOR_STATUS_DATA {
12157    type Message = MavMessage;
12158    const ID: u32 = 373u32;
12159    const NAME: &'static str = "GENERATOR_STATUS";
12160    const EXTRA_CRC: u8 = 117u8;
12161    const ENCODED_LEN: usize = 42usize;
12162    fn deser(
12163        _version: MavlinkVersion,
12164        __input: &[u8],
12165    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12166        let avail_len = __input.len();
12167        let mut payload_buf = [0; Self::ENCODED_LEN];
12168        let mut buf = if avail_len < Self::ENCODED_LEN {
12169            payload_buf[0..avail_len].copy_from_slice(__input);
12170            Bytes::new(&payload_buf)
12171        } else {
12172            Bytes::new(__input)
12173        };
12174        let mut __struct = Self::default();
12175        let tmp = buf.get_u64_le();
12176        __struct.status = MavGeneratorStatusFlag::from_bits(
12177            tmp & MavGeneratorStatusFlag::all().bits(),
12178        )
12179        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12180            flag_type: "MavGeneratorStatusFlag",
12181            value: tmp as u32,
12182        })?;
12183        __struct.battery_current = buf.get_f32_le();
12184        __struct.load_current = buf.get_f32_le();
12185        __struct.power_generated = buf.get_f32_le();
12186        __struct.bus_voltage = buf.get_f32_le();
12187        __struct.bat_current_setpoint = buf.get_f32_le();
12188        __struct.runtime = buf.get_u32_le();
12189        __struct.time_until_maintenance = buf.get_i32_le();
12190        __struct.generator_speed = buf.get_u16_le();
12191        __struct.rectifier_temperature = buf.get_i16_le();
12192        __struct.generator_temperature = buf.get_i16_le();
12193        Ok(__struct)
12194    }
12195    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12196        let mut __tmp = BytesMut::new(bytes);
12197        #[allow(clippy::absurd_extreme_comparisons)]
12198        #[allow(unused_comparisons)]
12199        if __tmp.remaining() < Self::ENCODED_LEN {
12200            panic!(
12201                "buffer is too small (need {} bytes, but got {})",
12202                Self::ENCODED_LEN,
12203                __tmp.remaining(),
12204            )
12205        }
12206        __tmp.put_u64_le(self.status.bits());
12207        __tmp.put_f32_le(self.battery_current);
12208        __tmp.put_f32_le(self.load_current);
12209        __tmp.put_f32_le(self.power_generated);
12210        __tmp.put_f32_le(self.bus_voltage);
12211        __tmp.put_f32_le(self.bat_current_setpoint);
12212        __tmp.put_u32_le(self.runtime);
12213        __tmp.put_i32_le(self.time_until_maintenance);
12214        __tmp.put_u16_le(self.generator_speed);
12215        __tmp.put_i16_le(self.rectifier_temperature);
12216        __tmp.put_i16_le(self.generator_temperature);
12217        if matches!(version, MavlinkVersion::V2) {
12218            let len = __tmp.len();
12219            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12220        } else {
12221            __tmp.len()
12222        }
12223    }
12224}
12225#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
12226#[doc = ""]
12227#[doc = "ID: 285"]
12228#[derive(Debug, Clone, PartialEq)]
12229#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12230#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12231#[cfg_attr(feature = "ts", derive(TS))]
12232#[cfg_attr(feature = "ts", ts(export))]
12233pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12234    #[doc = "Timestamp (time since system boot)."]
12235    pub time_boot_ms: u32,
12236    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
12237    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12238    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12239    pub q: [f32; 4],
12240    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
12241    pub angular_velocity_x: f32,
12242    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
12243    pub angular_velocity_y: f32,
12244    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
12245    pub angular_velocity_z: f32,
12246    #[doc = "Failure flags (0 for no failure)"]
12247    pub failure_flags: GimbalDeviceErrorFlags,
12248    #[doc = "Current gimbal flags set."]
12249    pub flags: GimbalDeviceFlags,
12250    #[doc = "System ID"]
12251    pub target_system: u8,
12252    #[doc = "Component ID"]
12253    pub target_component: u8,
12254    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
12255    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12256    pub delta_yaw: f32,
12257    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
12258    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12259    pub delta_yaw_velocity: f32,
12260    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12261    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12262    pub gimbal_device_id: u8,
12263}
12264impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12265    pub const ENCODED_LEN: usize = 49usize;
12266    pub const DEFAULT: Self = Self {
12267        time_boot_ms: 0_u32,
12268        q: [0.0_f32; 4usize],
12269        angular_velocity_x: 0.0_f32,
12270        angular_velocity_y: 0.0_f32,
12271        angular_velocity_z: 0.0_f32,
12272        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
12273        flags: GimbalDeviceFlags::DEFAULT,
12274        target_system: 0_u8,
12275        target_component: 0_u8,
12276        delta_yaw: 0.0_f32,
12277        delta_yaw_velocity: 0.0_f32,
12278        gimbal_device_id: 0_u8,
12279    };
12280    #[cfg(feature = "arbitrary")]
12281    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12282        use arbitrary::{Arbitrary, Unstructured};
12283        let mut buf = [0u8; 1024];
12284        rng.fill_bytes(&mut buf);
12285        let mut unstructured = Unstructured::new(&buf);
12286        Self::arbitrary(&mut unstructured).unwrap_or_default()
12287    }
12288}
12289impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12290    fn default() -> Self {
12291        Self::DEFAULT.clone()
12292    }
12293}
12294impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12295    type Message = MavMessage;
12296    const ID: u32 = 285u32;
12297    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
12298    const EXTRA_CRC: u8 = 137u8;
12299    const ENCODED_LEN: usize = 49usize;
12300    fn deser(
12301        _version: MavlinkVersion,
12302        __input: &[u8],
12303    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12304        let avail_len = __input.len();
12305        let mut payload_buf = [0; Self::ENCODED_LEN];
12306        let mut buf = if avail_len < Self::ENCODED_LEN {
12307            payload_buf[0..avail_len].copy_from_slice(__input);
12308            Bytes::new(&payload_buf)
12309        } else {
12310            Bytes::new(__input)
12311        };
12312        let mut __struct = Self::default();
12313        __struct.time_boot_ms = buf.get_u32_le();
12314        for v in &mut __struct.q {
12315            let val = buf.get_f32_le();
12316            *v = val;
12317        }
12318        __struct.angular_velocity_x = buf.get_f32_le();
12319        __struct.angular_velocity_y = buf.get_f32_le();
12320        __struct.angular_velocity_z = buf.get_f32_le();
12321        let tmp = buf.get_u32_le();
12322        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(
12323            tmp & GimbalDeviceErrorFlags::all().bits(),
12324        )
12325        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12326            flag_type: "GimbalDeviceErrorFlags",
12327            value: tmp as u32,
12328        })?;
12329        let tmp = buf.get_u16_le();
12330        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
12331            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12332                flag_type: "GimbalDeviceFlags",
12333                value: tmp as u32,
12334            })?;
12335        __struct.target_system = buf.get_u8();
12336        __struct.target_component = buf.get_u8();
12337        __struct.delta_yaw = buf.get_f32_le();
12338        __struct.delta_yaw_velocity = buf.get_f32_le();
12339        __struct.gimbal_device_id = buf.get_u8();
12340        Ok(__struct)
12341    }
12342    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12343        let mut __tmp = BytesMut::new(bytes);
12344        #[allow(clippy::absurd_extreme_comparisons)]
12345        #[allow(unused_comparisons)]
12346        if __tmp.remaining() < Self::ENCODED_LEN {
12347            panic!(
12348                "buffer is too small (need {} bytes, but got {})",
12349                Self::ENCODED_LEN,
12350                __tmp.remaining(),
12351            )
12352        }
12353        __tmp.put_u32_le(self.time_boot_ms);
12354        for val in &self.q {
12355            __tmp.put_f32_le(*val);
12356        }
12357        __tmp.put_f32_le(self.angular_velocity_x);
12358        __tmp.put_f32_le(self.angular_velocity_y);
12359        __tmp.put_f32_le(self.angular_velocity_z);
12360        __tmp.put_u32_le(self.failure_flags.bits());
12361        __tmp.put_u16_le(self.flags.bits());
12362        __tmp.put_u8(self.target_system);
12363        __tmp.put_u8(self.target_component);
12364        if matches!(version, MavlinkVersion::V2) {
12365            __tmp.put_f32_le(self.delta_yaw);
12366            __tmp.put_f32_le(self.delta_yaw_velocity);
12367            __tmp.put_u8(self.gimbal_device_id);
12368            let len = __tmp.len();
12369            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12370        } else {
12371            __tmp.len()
12372        }
12373    }
12374}
12375#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
12376#[doc = ""]
12377#[doc = "ID: 283"]
12378#[derive(Debug, Clone, PartialEq)]
12379#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12380#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12381#[cfg_attr(feature = "ts", derive(TS))]
12382#[cfg_attr(feature = "ts", ts(export))]
12383pub struct GIMBAL_DEVICE_INFORMATION_DATA {
12384    #[doc = "UID of gimbal hardware (0 if unknown)."]
12385    pub uid: u64,
12386    #[doc = "Timestamp (time since system boot)."]
12387    pub time_boot_ms: u32,
12388    #[doc = "0xff)."]
12389    pub firmware_version: u32,
12390    #[doc = "0xff)."]
12391    pub hardware_version: u32,
12392    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12393    pub roll_min: f32,
12394    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12395    pub roll_max: f32,
12396    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12397    pub pitch_min: f32,
12398    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12399    pub pitch_max: f32,
12400    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12401    pub yaw_min: f32,
12402    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12403    pub yaw_max: f32,
12404    #[doc = "Bitmap of gimbal capability flags."]
12405    pub cap_flags: GimbalDeviceCapFlags,
12406    #[doc = "Bitmap for use for gimbal-specific capability flags."]
12407    pub custom_cap_flags: u16,
12408    #[doc = "Name of the gimbal vendor."]
12409    #[cfg_attr(feature = "ts", ts(type = "string"))]
12410    pub vendor_name: CharArray<32>,
12411    #[doc = "Name of the gimbal model."]
12412    #[cfg_attr(feature = "ts", ts(type = "string"))]
12413    pub model_name: CharArray<32>,
12414    #[doc = "Custom name of the gimbal given to it by the user."]
12415    #[cfg_attr(feature = "ts", ts(type = "string"))]
12416    pub custom_name: CharArray<32>,
12417    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12418    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12419    pub gimbal_device_id: u8,
12420}
12421impl GIMBAL_DEVICE_INFORMATION_DATA {
12422    pub const ENCODED_LEN: usize = 145usize;
12423    pub const DEFAULT: Self = Self {
12424        uid: 0_u64,
12425        time_boot_ms: 0_u32,
12426        firmware_version: 0_u32,
12427        hardware_version: 0_u32,
12428        roll_min: 0.0_f32,
12429        roll_max: 0.0_f32,
12430        pitch_min: 0.0_f32,
12431        pitch_max: 0.0_f32,
12432        yaw_min: 0.0_f32,
12433        yaw_max: 0.0_f32,
12434        cap_flags: GimbalDeviceCapFlags::DEFAULT,
12435        custom_cap_flags: 0_u16,
12436        vendor_name: CharArray::new([0_u8; 32usize]),
12437        model_name: CharArray::new([0_u8; 32usize]),
12438        custom_name: CharArray::new([0_u8; 32usize]),
12439        gimbal_device_id: 0_u8,
12440    };
12441    #[cfg(feature = "arbitrary")]
12442    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12443        use arbitrary::{Arbitrary, Unstructured};
12444        let mut buf = [0u8; 1024];
12445        rng.fill_bytes(&mut buf);
12446        let mut unstructured = Unstructured::new(&buf);
12447        Self::arbitrary(&mut unstructured).unwrap_or_default()
12448    }
12449}
12450impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
12451    fn default() -> Self {
12452        Self::DEFAULT.clone()
12453    }
12454}
12455impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
12456    type Message = MavMessage;
12457    const ID: u32 = 283u32;
12458    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
12459    const EXTRA_CRC: u8 = 74u8;
12460    const ENCODED_LEN: usize = 145usize;
12461    fn deser(
12462        _version: MavlinkVersion,
12463        __input: &[u8],
12464    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12465        let avail_len = __input.len();
12466        let mut payload_buf = [0; Self::ENCODED_LEN];
12467        let mut buf = if avail_len < Self::ENCODED_LEN {
12468            payload_buf[0..avail_len].copy_from_slice(__input);
12469            Bytes::new(&payload_buf)
12470        } else {
12471            Bytes::new(__input)
12472        };
12473        let mut __struct = Self::default();
12474        __struct.uid = buf.get_u64_le();
12475        __struct.time_boot_ms = buf.get_u32_le();
12476        __struct.firmware_version = buf.get_u32_le();
12477        __struct.hardware_version = buf.get_u32_le();
12478        __struct.roll_min = buf.get_f32_le();
12479        __struct.roll_max = buf.get_f32_le();
12480        __struct.pitch_min = buf.get_f32_le();
12481        __struct.pitch_max = buf.get_f32_le();
12482        __struct.yaw_min = buf.get_f32_le();
12483        __struct.yaw_max = buf.get_f32_le();
12484        let tmp = buf.get_u16_le();
12485        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
12486            tmp & GimbalDeviceCapFlags::all().bits(),
12487        )
12488        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12489            flag_type: "GimbalDeviceCapFlags",
12490            value: tmp as u32,
12491        })?;
12492        __struct.custom_cap_flags = buf.get_u16_le();
12493        let mut tmp = [0_u8; 32usize];
12494        for v in &mut tmp {
12495            *v = buf.get_u8();
12496        }
12497        __struct.vendor_name = CharArray::new(tmp);
12498        let mut tmp = [0_u8; 32usize];
12499        for v in &mut tmp {
12500            *v = buf.get_u8();
12501        }
12502        __struct.model_name = CharArray::new(tmp);
12503        let mut tmp = [0_u8; 32usize];
12504        for v in &mut tmp {
12505            *v = buf.get_u8();
12506        }
12507        __struct.custom_name = CharArray::new(tmp);
12508        __struct.gimbal_device_id = buf.get_u8();
12509        Ok(__struct)
12510    }
12511    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12512        let mut __tmp = BytesMut::new(bytes);
12513        #[allow(clippy::absurd_extreme_comparisons)]
12514        #[allow(unused_comparisons)]
12515        if __tmp.remaining() < Self::ENCODED_LEN {
12516            panic!(
12517                "buffer is too small (need {} bytes, but got {})",
12518                Self::ENCODED_LEN,
12519                __tmp.remaining(),
12520            )
12521        }
12522        __tmp.put_u64_le(self.uid);
12523        __tmp.put_u32_le(self.time_boot_ms);
12524        __tmp.put_u32_le(self.firmware_version);
12525        __tmp.put_u32_le(self.hardware_version);
12526        __tmp.put_f32_le(self.roll_min);
12527        __tmp.put_f32_le(self.roll_max);
12528        __tmp.put_f32_le(self.pitch_min);
12529        __tmp.put_f32_le(self.pitch_max);
12530        __tmp.put_f32_le(self.yaw_min);
12531        __tmp.put_f32_le(self.yaw_max);
12532        __tmp.put_u16_le(self.cap_flags.bits());
12533        __tmp.put_u16_le(self.custom_cap_flags);
12534        for val in &self.vendor_name {
12535            __tmp.put_u8(*val);
12536        }
12537        for val in &self.model_name {
12538            __tmp.put_u8(*val);
12539        }
12540        for val in &self.custom_name {
12541            __tmp.put_u8(*val);
12542        }
12543        if matches!(version, MavlinkVersion::V2) {
12544            __tmp.put_u8(self.gimbal_device_id);
12545            let len = __tmp.len();
12546            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12547        } else {
12548            __tmp.len()
12549        }
12550    }
12551}
12552#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
12553#[doc = ""]
12554#[doc = "ID: 284"]
12555#[derive(Debug, Clone, PartialEq)]
12556#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12557#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12558#[cfg_attr(feature = "ts", derive(TS))]
12559#[cfg_attr(feature = "ts", ts(export))]
12560pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12561    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
12562    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12563    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12564    pub q: [f32; 4],
12565    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
12566    pub angular_velocity_x: f32,
12567    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
12568    pub angular_velocity_y: f32,
12569    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
12570    pub angular_velocity_z: f32,
12571    #[doc = "Low level gimbal flags."]
12572    pub flags: GimbalDeviceFlags,
12573    #[doc = "System ID"]
12574    pub target_system: u8,
12575    #[doc = "Component ID"]
12576    pub target_component: u8,
12577}
12578impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12579    pub const ENCODED_LEN: usize = 32usize;
12580    pub const DEFAULT: Self = Self {
12581        q: [0.0_f32; 4usize],
12582        angular_velocity_x: 0.0_f32,
12583        angular_velocity_y: 0.0_f32,
12584        angular_velocity_z: 0.0_f32,
12585        flags: GimbalDeviceFlags::DEFAULT,
12586        target_system: 0_u8,
12587        target_component: 0_u8,
12588    };
12589    #[cfg(feature = "arbitrary")]
12590    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12591        use arbitrary::{Arbitrary, Unstructured};
12592        let mut buf = [0u8; 1024];
12593        rng.fill_bytes(&mut buf);
12594        let mut unstructured = Unstructured::new(&buf);
12595        Self::arbitrary(&mut unstructured).unwrap_or_default()
12596    }
12597}
12598impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12599    fn default() -> Self {
12600        Self::DEFAULT.clone()
12601    }
12602}
12603impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12604    type Message = MavMessage;
12605    const ID: u32 = 284u32;
12606    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
12607    const EXTRA_CRC: u8 = 99u8;
12608    const ENCODED_LEN: usize = 32usize;
12609    fn deser(
12610        _version: MavlinkVersion,
12611        __input: &[u8],
12612    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12613        let avail_len = __input.len();
12614        let mut payload_buf = [0; Self::ENCODED_LEN];
12615        let mut buf = if avail_len < Self::ENCODED_LEN {
12616            payload_buf[0..avail_len].copy_from_slice(__input);
12617            Bytes::new(&payload_buf)
12618        } else {
12619            Bytes::new(__input)
12620        };
12621        let mut __struct = Self::default();
12622        for v in &mut __struct.q {
12623            let val = buf.get_f32_le();
12624            *v = val;
12625        }
12626        __struct.angular_velocity_x = buf.get_f32_le();
12627        __struct.angular_velocity_y = buf.get_f32_le();
12628        __struct.angular_velocity_z = buf.get_f32_le();
12629        let tmp = buf.get_u16_le();
12630        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
12631            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12632                flag_type: "GimbalDeviceFlags",
12633                value: tmp as u32,
12634            })?;
12635        __struct.target_system = buf.get_u8();
12636        __struct.target_component = buf.get_u8();
12637        Ok(__struct)
12638    }
12639    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12640        let mut __tmp = BytesMut::new(bytes);
12641        #[allow(clippy::absurd_extreme_comparisons)]
12642        #[allow(unused_comparisons)]
12643        if __tmp.remaining() < Self::ENCODED_LEN {
12644            panic!(
12645                "buffer is too small (need {} bytes, but got {})",
12646                Self::ENCODED_LEN,
12647                __tmp.remaining(),
12648            )
12649        }
12650        for val in &self.q {
12651            __tmp.put_f32_le(*val);
12652        }
12653        __tmp.put_f32_le(self.angular_velocity_x);
12654        __tmp.put_f32_le(self.angular_velocity_y);
12655        __tmp.put_f32_le(self.angular_velocity_z);
12656        __tmp.put_u16_le(self.flags.bits());
12657        __tmp.put_u8(self.target_system);
12658        __tmp.put_u8(self.target_component);
12659        if matches!(version, MavlinkVersion::V2) {
12660            let len = __tmp.len();
12661            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12662        } else {
12663            __tmp.len()
12664        }
12665    }
12666}
12667#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
12668#[doc = ""]
12669#[doc = "ID: 280"]
12670#[derive(Debug, Clone, PartialEq)]
12671#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12672#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12673#[cfg_attr(feature = "ts", derive(TS))]
12674#[cfg_attr(feature = "ts", ts(export))]
12675pub struct GIMBAL_MANAGER_INFORMATION_DATA {
12676    #[doc = "Timestamp (time since system boot)."]
12677    pub time_boot_ms: u32,
12678    #[doc = "Bitmap of gimbal capability flags."]
12679    pub cap_flags: GimbalManagerCapFlags,
12680    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12681    pub roll_min: f32,
12682    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12683    pub roll_max: f32,
12684    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
12685    pub pitch_min: f32,
12686    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
12687    pub pitch_max: f32,
12688    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
12689    pub yaw_min: f32,
12690    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
12691    pub yaw_max: f32,
12692    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
12693    pub gimbal_device_id: u8,
12694}
12695impl GIMBAL_MANAGER_INFORMATION_DATA {
12696    pub const ENCODED_LEN: usize = 33usize;
12697    pub const DEFAULT: Self = Self {
12698        time_boot_ms: 0_u32,
12699        cap_flags: GimbalManagerCapFlags::DEFAULT,
12700        roll_min: 0.0_f32,
12701        roll_max: 0.0_f32,
12702        pitch_min: 0.0_f32,
12703        pitch_max: 0.0_f32,
12704        yaw_min: 0.0_f32,
12705        yaw_max: 0.0_f32,
12706        gimbal_device_id: 0_u8,
12707    };
12708    #[cfg(feature = "arbitrary")]
12709    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12710        use arbitrary::{Arbitrary, Unstructured};
12711        let mut buf = [0u8; 1024];
12712        rng.fill_bytes(&mut buf);
12713        let mut unstructured = Unstructured::new(&buf);
12714        Self::arbitrary(&mut unstructured).unwrap_or_default()
12715    }
12716}
12717impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
12718    fn default() -> Self {
12719        Self::DEFAULT.clone()
12720    }
12721}
12722impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
12723    type Message = MavMessage;
12724    const ID: u32 = 280u32;
12725    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
12726    const EXTRA_CRC: u8 = 70u8;
12727    const ENCODED_LEN: usize = 33usize;
12728    fn deser(
12729        _version: MavlinkVersion,
12730        __input: &[u8],
12731    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12732        let avail_len = __input.len();
12733        let mut payload_buf = [0; Self::ENCODED_LEN];
12734        let mut buf = if avail_len < Self::ENCODED_LEN {
12735            payload_buf[0..avail_len].copy_from_slice(__input);
12736            Bytes::new(&payload_buf)
12737        } else {
12738            Bytes::new(__input)
12739        };
12740        let mut __struct = Self::default();
12741        __struct.time_boot_ms = buf.get_u32_le();
12742        let tmp = buf.get_u32_le();
12743        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
12744            tmp & GimbalManagerCapFlags::all().bits(),
12745        )
12746        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12747            flag_type: "GimbalManagerCapFlags",
12748            value: tmp as u32,
12749        })?;
12750        __struct.roll_min = buf.get_f32_le();
12751        __struct.roll_max = buf.get_f32_le();
12752        __struct.pitch_min = buf.get_f32_le();
12753        __struct.pitch_max = buf.get_f32_le();
12754        __struct.yaw_min = buf.get_f32_le();
12755        __struct.yaw_max = buf.get_f32_le();
12756        __struct.gimbal_device_id = buf.get_u8();
12757        Ok(__struct)
12758    }
12759    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12760        let mut __tmp = BytesMut::new(bytes);
12761        #[allow(clippy::absurd_extreme_comparisons)]
12762        #[allow(unused_comparisons)]
12763        if __tmp.remaining() < Self::ENCODED_LEN {
12764            panic!(
12765                "buffer is too small (need {} bytes, but got {})",
12766                Self::ENCODED_LEN,
12767                __tmp.remaining(),
12768            )
12769        }
12770        __tmp.put_u32_le(self.time_boot_ms);
12771        __tmp.put_u32_le(self.cap_flags.bits());
12772        __tmp.put_f32_le(self.roll_min);
12773        __tmp.put_f32_le(self.roll_max);
12774        __tmp.put_f32_le(self.pitch_min);
12775        __tmp.put_f32_le(self.pitch_max);
12776        __tmp.put_f32_le(self.yaw_min);
12777        __tmp.put_f32_le(self.yaw_max);
12778        __tmp.put_u8(self.gimbal_device_id);
12779        if matches!(version, MavlinkVersion::V2) {
12780            let len = __tmp.len();
12781            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12782        } else {
12783            __tmp.len()
12784        }
12785    }
12786}
12787#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
12788#[doc = ""]
12789#[doc = "ID: 282"]
12790#[derive(Debug, Clone, PartialEq)]
12791#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12792#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12793#[cfg_attr(feature = "ts", derive(TS))]
12794#[cfg_attr(feature = "ts", ts(export))]
12795pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12796    #[doc = "High level gimbal manager flags to use."]
12797    pub flags: GimbalManagerFlags,
12798    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
12799    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12800    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12801    pub q: [f32; 4],
12802    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
12803    pub angular_velocity_x: f32,
12804    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
12805    pub angular_velocity_y: f32,
12806    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
12807    pub angular_velocity_z: f32,
12808    #[doc = "System ID"]
12809    pub target_system: u8,
12810    #[doc = "Component ID"]
12811    pub target_component: u8,
12812    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12813    pub gimbal_device_id: u8,
12814}
12815impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12816    pub const ENCODED_LEN: usize = 35usize;
12817    pub const DEFAULT: Self = Self {
12818        flags: GimbalManagerFlags::DEFAULT,
12819        q: [0.0_f32; 4usize],
12820        angular_velocity_x: 0.0_f32,
12821        angular_velocity_y: 0.0_f32,
12822        angular_velocity_z: 0.0_f32,
12823        target_system: 0_u8,
12824        target_component: 0_u8,
12825        gimbal_device_id: 0_u8,
12826    };
12827    #[cfg(feature = "arbitrary")]
12828    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12829        use arbitrary::{Arbitrary, Unstructured};
12830        let mut buf = [0u8; 1024];
12831        rng.fill_bytes(&mut buf);
12832        let mut unstructured = Unstructured::new(&buf);
12833        Self::arbitrary(&mut unstructured).unwrap_or_default()
12834    }
12835}
12836impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12837    fn default() -> Self {
12838        Self::DEFAULT.clone()
12839    }
12840}
12841impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12842    type Message = MavMessage;
12843    const ID: u32 = 282u32;
12844    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
12845    const EXTRA_CRC: u8 = 123u8;
12846    const ENCODED_LEN: usize = 35usize;
12847    fn deser(
12848        _version: MavlinkVersion,
12849        __input: &[u8],
12850    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12851        let avail_len = __input.len();
12852        let mut payload_buf = [0; Self::ENCODED_LEN];
12853        let mut buf = if avail_len < Self::ENCODED_LEN {
12854            payload_buf[0..avail_len].copy_from_slice(__input);
12855            Bytes::new(&payload_buf)
12856        } else {
12857            Bytes::new(__input)
12858        };
12859        let mut __struct = Self::default();
12860        let tmp = buf.get_u32_le();
12861        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
12862            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12863                flag_type: "GimbalManagerFlags",
12864                value: tmp as u32,
12865            })?;
12866        for v in &mut __struct.q {
12867            let val = buf.get_f32_le();
12868            *v = val;
12869        }
12870        __struct.angular_velocity_x = buf.get_f32_le();
12871        __struct.angular_velocity_y = buf.get_f32_le();
12872        __struct.angular_velocity_z = buf.get_f32_le();
12873        __struct.target_system = buf.get_u8();
12874        __struct.target_component = buf.get_u8();
12875        __struct.gimbal_device_id = buf.get_u8();
12876        Ok(__struct)
12877    }
12878    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12879        let mut __tmp = BytesMut::new(bytes);
12880        #[allow(clippy::absurd_extreme_comparisons)]
12881        #[allow(unused_comparisons)]
12882        if __tmp.remaining() < Self::ENCODED_LEN {
12883            panic!(
12884                "buffer is too small (need {} bytes, but got {})",
12885                Self::ENCODED_LEN,
12886                __tmp.remaining(),
12887            )
12888        }
12889        __tmp.put_u32_le(self.flags.bits());
12890        for val in &self.q {
12891            __tmp.put_f32_le(*val);
12892        }
12893        __tmp.put_f32_le(self.angular_velocity_x);
12894        __tmp.put_f32_le(self.angular_velocity_y);
12895        __tmp.put_f32_le(self.angular_velocity_z);
12896        __tmp.put_u8(self.target_system);
12897        __tmp.put_u8(self.target_component);
12898        __tmp.put_u8(self.gimbal_device_id);
12899        if matches!(version, MavlinkVersion::V2) {
12900            let len = __tmp.len();
12901            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12902        } else {
12903            __tmp.len()
12904        }
12905    }
12906}
12907#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
12908#[doc = ""]
12909#[doc = "ID: 288"]
12910#[derive(Debug, Clone, PartialEq)]
12911#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12912#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12913#[cfg_attr(feature = "ts", derive(TS))]
12914#[cfg_attr(feature = "ts", ts(export))]
12915pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12916    #[doc = "High level gimbal manager flags."]
12917    pub flags: GimbalManagerFlags,
12918    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
12919    pub pitch: f32,
12920    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
12921    pub yaw: f32,
12922    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
12923    pub pitch_rate: f32,
12924    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
12925    pub yaw_rate: f32,
12926    #[doc = "System ID"]
12927    pub target_system: u8,
12928    #[doc = "Component ID"]
12929    pub target_component: u8,
12930    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12931    pub gimbal_device_id: u8,
12932}
12933impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12934    pub const ENCODED_LEN: usize = 23usize;
12935    pub const DEFAULT: Self = Self {
12936        flags: GimbalManagerFlags::DEFAULT,
12937        pitch: 0.0_f32,
12938        yaw: 0.0_f32,
12939        pitch_rate: 0.0_f32,
12940        yaw_rate: 0.0_f32,
12941        target_system: 0_u8,
12942        target_component: 0_u8,
12943        gimbal_device_id: 0_u8,
12944    };
12945    #[cfg(feature = "arbitrary")]
12946    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12947        use arbitrary::{Arbitrary, Unstructured};
12948        let mut buf = [0u8; 1024];
12949        rng.fill_bytes(&mut buf);
12950        let mut unstructured = Unstructured::new(&buf);
12951        Self::arbitrary(&mut unstructured).unwrap_or_default()
12952    }
12953}
12954impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12955    fn default() -> Self {
12956        Self::DEFAULT.clone()
12957    }
12958}
12959impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12960    type Message = MavMessage;
12961    const ID: u32 = 288u32;
12962    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
12963    const EXTRA_CRC: u8 = 20u8;
12964    const ENCODED_LEN: usize = 23usize;
12965    fn deser(
12966        _version: MavlinkVersion,
12967        __input: &[u8],
12968    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12969        let avail_len = __input.len();
12970        let mut payload_buf = [0; Self::ENCODED_LEN];
12971        let mut buf = if avail_len < Self::ENCODED_LEN {
12972            payload_buf[0..avail_len].copy_from_slice(__input);
12973            Bytes::new(&payload_buf)
12974        } else {
12975            Bytes::new(__input)
12976        };
12977        let mut __struct = Self::default();
12978        let tmp = buf.get_u32_le();
12979        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
12980            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12981                flag_type: "GimbalManagerFlags",
12982                value: tmp as u32,
12983            })?;
12984        __struct.pitch = buf.get_f32_le();
12985        __struct.yaw = buf.get_f32_le();
12986        __struct.pitch_rate = buf.get_f32_le();
12987        __struct.yaw_rate = buf.get_f32_le();
12988        __struct.target_system = buf.get_u8();
12989        __struct.target_component = buf.get_u8();
12990        __struct.gimbal_device_id = buf.get_u8();
12991        Ok(__struct)
12992    }
12993    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12994        let mut __tmp = BytesMut::new(bytes);
12995        #[allow(clippy::absurd_extreme_comparisons)]
12996        #[allow(unused_comparisons)]
12997        if __tmp.remaining() < Self::ENCODED_LEN {
12998            panic!(
12999                "buffer is too small (need {} bytes, but got {})",
13000                Self::ENCODED_LEN,
13001                __tmp.remaining(),
13002            )
13003        }
13004        __tmp.put_u32_le(self.flags.bits());
13005        __tmp.put_f32_le(self.pitch);
13006        __tmp.put_f32_le(self.yaw);
13007        __tmp.put_f32_le(self.pitch_rate);
13008        __tmp.put_f32_le(self.yaw_rate);
13009        __tmp.put_u8(self.target_system);
13010        __tmp.put_u8(self.target_component);
13011        __tmp.put_u8(self.gimbal_device_id);
13012        if matches!(version, MavlinkVersion::V2) {
13013            let len = __tmp.len();
13014            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13015        } else {
13016            __tmp.len()
13017        }
13018    }
13019}
13020#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13021#[doc = ""]
13022#[doc = "ID: 287"]
13023#[derive(Debug, Clone, PartialEq)]
13024#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13025#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13026#[cfg_attr(feature = "ts", derive(TS))]
13027#[cfg_attr(feature = "ts", ts(export))]
13028pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13029    #[doc = "High level gimbal manager flags to use."]
13030    pub flags: GimbalManagerFlags,
13031    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13032    pub pitch: f32,
13033    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13034    pub yaw: f32,
13035    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13036    pub pitch_rate: f32,
13037    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13038    pub yaw_rate: f32,
13039    #[doc = "System ID"]
13040    pub target_system: u8,
13041    #[doc = "Component ID"]
13042    pub target_component: u8,
13043    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13044    pub gimbal_device_id: u8,
13045}
13046impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13047    pub const ENCODED_LEN: usize = 23usize;
13048    pub const DEFAULT: Self = Self {
13049        flags: GimbalManagerFlags::DEFAULT,
13050        pitch: 0.0_f32,
13051        yaw: 0.0_f32,
13052        pitch_rate: 0.0_f32,
13053        yaw_rate: 0.0_f32,
13054        target_system: 0_u8,
13055        target_component: 0_u8,
13056        gimbal_device_id: 0_u8,
13057    };
13058    #[cfg(feature = "arbitrary")]
13059    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13060        use arbitrary::{Arbitrary, Unstructured};
13061        let mut buf = [0u8; 1024];
13062        rng.fill_bytes(&mut buf);
13063        let mut unstructured = Unstructured::new(&buf);
13064        Self::arbitrary(&mut unstructured).unwrap_or_default()
13065    }
13066}
13067impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13068    fn default() -> Self {
13069        Self::DEFAULT.clone()
13070    }
13071}
13072impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13073    type Message = MavMessage;
13074    const ID: u32 = 287u32;
13075    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
13076    const EXTRA_CRC: u8 = 1u8;
13077    const ENCODED_LEN: usize = 23usize;
13078    fn deser(
13079        _version: MavlinkVersion,
13080        __input: &[u8],
13081    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13082        let avail_len = __input.len();
13083        let mut payload_buf = [0; Self::ENCODED_LEN];
13084        let mut buf = if avail_len < Self::ENCODED_LEN {
13085            payload_buf[0..avail_len].copy_from_slice(__input);
13086            Bytes::new(&payload_buf)
13087        } else {
13088            Bytes::new(__input)
13089        };
13090        let mut __struct = Self::default();
13091        let tmp = buf.get_u32_le();
13092        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13093            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13094                flag_type: "GimbalManagerFlags",
13095                value: tmp as u32,
13096            })?;
13097        __struct.pitch = buf.get_f32_le();
13098        __struct.yaw = buf.get_f32_le();
13099        __struct.pitch_rate = buf.get_f32_le();
13100        __struct.yaw_rate = buf.get_f32_le();
13101        __struct.target_system = buf.get_u8();
13102        __struct.target_component = buf.get_u8();
13103        __struct.gimbal_device_id = buf.get_u8();
13104        Ok(__struct)
13105    }
13106    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13107        let mut __tmp = BytesMut::new(bytes);
13108        #[allow(clippy::absurd_extreme_comparisons)]
13109        #[allow(unused_comparisons)]
13110        if __tmp.remaining() < Self::ENCODED_LEN {
13111            panic!(
13112                "buffer is too small (need {} bytes, but got {})",
13113                Self::ENCODED_LEN,
13114                __tmp.remaining(),
13115            )
13116        }
13117        __tmp.put_u32_le(self.flags.bits());
13118        __tmp.put_f32_le(self.pitch);
13119        __tmp.put_f32_le(self.yaw);
13120        __tmp.put_f32_le(self.pitch_rate);
13121        __tmp.put_f32_le(self.yaw_rate);
13122        __tmp.put_u8(self.target_system);
13123        __tmp.put_u8(self.target_component);
13124        __tmp.put_u8(self.gimbal_device_id);
13125        if matches!(version, MavlinkVersion::V2) {
13126            let len = __tmp.len();
13127            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13128        } else {
13129            __tmp.len()
13130        }
13131    }
13132}
13133#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
13134#[doc = ""]
13135#[doc = "ID: 281"]
13136#[derive(Debug, Clone, PartialEq)]
13137#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13138#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13139#[cfg_attr(feature = "ts", derive(TS))]
13140#[cfg_attr(feature = "ts", ts(export))]
13141pub struct GIMBAL_MANAGER_STATUS_DATA {
13142    #[doc = "Timestamp (time since system boot)."]
13143    pub time_boot_ms: u32,
13144    #[doc = "High level gimbal manager flags currently applied."]
13145    pub flags: GimbalManagerFlags,
13146    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13147    pub gimbal_device_id: u8,
13148    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
13149    pub primary_control_sysid: u8,
13150    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
13151    pub primary_control_compid: u8,
13152    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
13153    pub secondary_control_sysid: u8,
13154    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
13155    pub secondary_control_compid: u8,
13156}
13157impl GIMBAL_MANAGER_STATUS_DATA {
13158    pub const ENCODED_LEN: usize = 13usize;
13159    pub const DEFAULT: Self = Self {
13160        time_boot_ms: 0_u32,
13161        flags: GimbalManagerFlags::DEFAULT,
13162        gimbal_device_id: 0_u8,
13163        primary_control_sysid: 0_u8,
13164        primary_control_compid: 0_u8,
13165        secondary_control_sysid: 0_u8,
13166        secondary_control_compid: 0_u8,
13167    };
13168    #[cfg(feature = "arbitrary")]
13169    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13170        use arbitrary::{Arbitrary, Unstructured};
13171        let mut buf = [0u8; 1024];
13172        rng.fill_bytes(&mut buf);
13173        let mut unstructured = Unstructured::new(&buf);
13174        Self::arbitrary(&mut unstructured).unwrap_or_default()
13175    }
13176}
13177impl Default for GIMBAL_MANAGER_STATUS_DATA {
13178    fn default() -> Self {
13179        Self::DEFAULT.clone()
13180    }
13181}
13182impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
13183    type Message = MavMessage;
13184    const ID: u32 = 281u32;
13185    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
13186    const EXTRA_CRC: u8 = 48u8;
13187    const ENCODED_LEN: usize = 13usize;
13188    fn deser(
13189        _version: MavlinkVersion,
13190        __input: &[u8],
13191    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13192        let avail_len = __input.len();
13193        let mut payload_buf = [0; Self::ENCODED_LEN];
13194        let mut buf = if avail_len < Self::ENCODED_LEN {
13195            payload_buf[0..avail_len].copy_from_slice(__input);
13196            Bytes::new(&payload_buf)
13197        } else {
13198            Bytes::new(__input)
13199        };
13200        let mut __struct = Self::default();
13201        __struct.time_boot_ms = buf.get_u32_le();
13202        let tmp = buf.get_u32_le();
13203        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13204            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13205                flag_type: "GimbalManagerFlags",
13206                value: tmp as u32,
13207            })?;
13208        __struct.gimbal_device_id = buf.get_u8();
13209        __struct.primary_control_sysid = buf.get_u8();
13210        __struct.primary_control_compid = buf.get_u8();
13211        __struct.secondary_control_sysid = buf.get_u8();
13212        __struct.secondary_control_compid = buf.get_u8();
13213        Ok(__struct)
13214    }
13215    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13216        let mut __tmp = BytesMut::new(bytes);
13217        #[allow(clippy::absurd_extreme_comparisons)]
13218        #[allow(unused_comparisons)]
13219        if __tmp.remaining() < Self::ENCODED_LEN {
13220            panic!(
13221                "buffer is too small (need {} bytes, but got {})",
13222                Self::ENCODED_LEN,
13223                __tmp.remaining(),
13224            )
13225        }
13226        __tmp.put_u32_le(self.time_boot_ms);
13227        __tmp.put_u32_le(self.flags.bits());
13228        __tmp.put_u8(self.gimbal_device_id);
13229        __tmp.put_u8(self.primary_control_sysid);
13230        __tmp.put_u8(self.primary_control_compid);
13231        __tmp.put_u8(self.secondary_control_sysid);
13232        __tmp.put_u8(self.secondary_control_compid);
13233        if matches!(version, MavlinkVersion::V2) {
13234            let len = __tmp.len();
13235            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13236        } else {
13237            __tmp.len()
13238        }
13239    }
13240}
13241#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
13242#[doc = ""]
13243#[doc = "ID: 33"]
13244#[derive(Debug, Clone, PartialEq)]
13245#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13246#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13247#[cfg_attr(feature = "ts", derive(TS))]
13248#[cfg_attr(feature = "ts", ts(export))]
13249pub struct GLOBAL_POSITION_INT_DATA {
13250    #[doc = "Timestamp (time since system boot)."]
13251    pub time_boot_ms: u32,
13252    #[doc = "Latitude, expressed"]
13253    pub lat: i32,
13254    #[doc = "Longitude, expressed"]
13255    pub lon: i32,
13256    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
13257    pub alt: i32,
13258    #[doc = "Altitude above home"]
13259    pub relative_alt: i32,
13260    #[doc = "Ground X Speed (Latitude, positive north)"]
13261    pub vx: i16,
13262    #[doc = "Ground Y Speed (Longitude, positive east)"]
13263    pub vy: i16,
13264    #[doc = "Ground Z Speed (Altitude, positive down)"]
13265    pub vz: i16,
13266    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13267    pub hdg: u16,
13268}
13269impl GLOBAL_POSITION_INT_DATA {
13270    pub const ENCODED_LEN: usize = 28usize;
13271    pub const DEFAULT: Self = Self {
13272        time_boot_ms: 0_u32,
13273        lat: 0_i32,
13274        lon: 0_i32,
13275        alt: 0_i32,
13276        relative_alt: 0_i32,
13277        vx: 0_i16,
13278        vy: 0_i16,
13279        vz: 0_i16,
13280        hdg: 0_u16,
13281    };
13282    #[cfg(feature = "arbitrary")]
13283    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13284        use arbitrary::{Arbitrary, Unstructured};
13285        let mut buf = [0u8; 1024];
13286        rng.fill_bytes(&mut buf);
13287        let mut unstructured = Unstructured::new(&buf);
13288        Self::arbitrary(&mut unstructured).unwrap_or_default()
13289    }
13290}
13291impl Default for GLOBAL_POSITION_INT_DATA {
13292    fn default() -> Self {
13293        Self::DEFAULT.clone()
13294    }
13295}
13296impl MessageData for GLOBAL_POSITION_INT_DATA {
13297    type Message = MavMessage;
13298    const ID: u32 = 33u32;
13299    const NAME: &'static str = "GLOBAL_POSITION_INT";
13300    const EXTRA_CRC: u8 = 104u8;
13301    const ENCODED_LEN: usize = 28usize;
13302    fn deser(
13303        _version: MavlinkVersion,
13304        __input: &[u8],
13305    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13306        let avail_len = __input.len();
13307        let mut payload_buf = [0; Self::ENCODED_LEN];
13308        let mut buf = if avail_len < Self::ENCODED_LEN {
13309            payload_buf[0..avail_len].copy_from_slice(__input);
13310            Bytes::new(&payload_buf)
13311        } else {
13312            Bytes::new(__input)
13313        };
13314        let mut __struct = Self::default();
13315        __struct.time_boot_ms = buf.get_u32_le();
13316        __struct.lat = buf.get_i32_le();
13317        __struct.lon = buf.get_i32_le();
13318        __struct.alt = buf.get_i32_le();
13319        __struct.relative_alt = buf.get_i32_le();
13320        __struct.vx = buf.get_i16_le();
13321        __struct.vy = buf.get_i16_le();
13322        __struct.vz = buf.get_i16_le();
13323        __struct.hdg = buf.get_u16_le();
13324        Ok(__struct)
13325    }
13326    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13327        let mut __tmp = BytesMut::new(bytes);
13328        #[allow(clippy::absurd_extreme_comparisons)]
13329        #[allow(unused_comparisons)]
13330        if __tmp.remaining() < Self::ENCODED_LEN {
13331            panic!(
13332                "buffer is too small (need {} bytes, but got {})",
13333                Self::ENCODED_LEN,
13334                __tmp.remaining(),
13335            )
13336        }
13337        __tmp.put_u32_le(self.time_boot_ms);
13338        __tmp.put_i32_le(self.lat);
13339        __tmp.put_i32_le(self.lon);
13340        __tmp.put_i32_le(self.alt);
13341        __tmp.put_i32_le(self.relative_alt);
13342        __tmp.put_i16_le(self.vx);
13343        __tmp.put_i16_le(self.vy);
13344        __tmp.put_i16_le(self.vz);
13345        __tmp.put_u16_le(self.hdg);
13346        if matches!(version, MavlinkVersion::V2) {
13347            let len = __tmp.len();
13348            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13349        } else {
13350            __tmp.len()
13351        }
13352    }
13353}
13354#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
13355#[doc = ""]
13356#[doc = "ID: 63"]
13357#[derive(Debug, Clone, PartialEq)]
13358#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13359#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13360#[cfg_attr(feature = "ts", derive(TS))]
13361#[cfg_attr(feature = "ts", ts(export))]
13362pub struct GLOBAL_POSITION_INT_COV_DATA {
13363    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13364    pub time_usec: u64,
13365    #[doc = "Latitude"]
13366    pub lat: i32,
13367    #[doc = "Longitude"]
13368    pub lon: i32,
13369    #[doc = "Altitude in meters above MSL"]
13370    pub alt: i32,
13371    #[doc = "Altitude above ground"]
13372    pub relative_alt: i32,
13373    #[doc = "Ground X Speed (Latitude)"]
13374    pub vx: f32,
13375    #[doc = "Ground Y Speed (Longitude)"]
13376    pub vy: f32,
13377    #[doc = "Ground Z Speed (Altitude)"]
13378    pub vz: f32,
13379    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
13380    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13381    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13382    pub covariance: [f32; 36],
13383    #[doc = "Class id of the estimator this estimate originated from."]
13384    pub estimator_type: MavEstimatorType,
13385}
13386impl GLOBAL_POSITION_INT_COV_DATA {
13387    pub const ENCODED_LEN: usize = 181usize;
13388    pub const DEFAULT: Self = Self {
13389        time_usec: 0_u64,
13390        lat: 0_i32,
13391        lon: 0_i32,
13392        alt: 0_i32,
13393        relative_alt: 0_i32,
13394        vx: 0.0_f32,
13395        vy: 0.0_f32,
13396        vz: 0.0_f32,
13397        covariance: [0.0_f32; 36usize],
13398        estimator_type: MavEstimatorType::DEFAULT,
13399    };
13400    #[cfg(feature = "arbitrary")]
13401    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13402        use arbitrary::{Arbitrary, Unstructured};
13403        let mut buf = [0u8; 1024];
13404        rng.fill_bytes(&mut buf);
13405        let mut unstructured = Unstructured::new(&buf);
13406        Self::arbitrary(&mut unstructured).unwrap_or_default()
13407    }
13408}
13409impl Default for GLOBAL_POSITION_INT_COV_DATA {
13410    fn default() -> Self {
13411        Self::DEFAULT.clone()
13412    }
13413}
13414impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
13415    type Message = MavMessage;
13416    const ID: u32 = 63u32;
13417    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
13418    const EXTRA_CRC: u8 = 119u8;
13419    const ENCODED_LEN: usize = 181usize;
13420    fn deser(
13421        _version: MavlinkVersion,
13422        __input: &[u8],
13423    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13424        let avail_len = __input.len();
13425        let mut payload_buf = [0; Self::ENCODED_LEN];
13426        let mut buf = if avail_len < Self::ENCODED_LEN {
13427            payload_buf[0..avail_len].copy_from_slice(__input);
13428            Bytes::new(&payload_buf)
13429        } else {
13430            Bytes::new(__input)
13431        };
13432        let mut __struct = Self::default();
13433        __struct.time_usec = buf.get_u64_le();
13434        __struct.lat = buf.get_i32_le();
13435        __struct.lon = buf.get_i32_le();
13436        __struct.alt = buf.get_i32_le();
13437        __struct.relative_alt = buf.get_i32_le();
13438        __struct.vx = buf.get_f32_le();
13439        __struct.vy = buf.get_f32_le();
13440        __struct.vz = buf.get_f32_le();
13441        for v in &mut __struct.covariance {
13442            let val = buf.get_f32_le();
13443            *v = val;
13444        }
13445        let tmp = buf.get_u8();
13446        __struct.estimator_type =
13447            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13448                enum_type: "MavEstimatorType",
13449                value: tmp as u32,
13450            })?;
13451        Ok(__struct)
13452    }
13453    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13454        let mut __tmp = BytesMut::new(bytes);
13455        #[allow(clippy::absurd_extreme_comparisons)]
13456        #[allow(unused_comparisons)]
13457        if __tmp.remaining() < Self::ENCODED_LEN {
13458            panic!(
13459                "buffer is too small (need {} bytes, but got {})",
13460                Self::ENCODED_LEN,
13461                __tmp.remaining(),
13462            )
13463        }
13464        __tmp.put_u64_le(self.time_usec);
13465        __tmp.put_i32_le(self.lat);
13466        __tmp.put_i32_le(self.lon);
13467        __tmp.put_i32_le(self.alt);
13468        __tmp.put_i32_le(self.relative_alt);
13469        __tmp.put_f32_le(self.vx);
13470        __tmp.put_f32_le(self.vy);
13471        __tmp.put_f32_le(self.vz);
13472        for val in &self.covariance {
13473            __tmp.put_f32_le(*val);
13474        }
13475        __tmp.put_u8(self.estimator_type as u8);
13476        if matches!(version, MavlinkVersion::V2) {
13477            let len = __tmp.len();
13478            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13479        } else {
13480            __tmp.len()
13481        }
13482    }
13483}
13484#[doc = "Global position/attitude estimate from a vision source."]
13485#[doc = ""]
13486#[doc = "ID: 101"]
13487#[derive(Debug, Clone, PartialEq)]
13488#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13489#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13490#[cfg_attr(feature = "ts", derive(TS))]
13491#[cfg_attr(feature = "ts", ts(export))]
13492pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13493    #[doc = "Timestamp (UNIX time or since system boot)"]
13494    pub usec: u64,
13495    #[doc = "Global X position"]
13496    pub x: f32,
13497    #[doc = "Global Y position"]
13498    pub y: f32,
13499    #[doc = "Global Z position"]
13500    pub z: f32,
13501    #[doc = "Roll angle"]
13502    pub roll: f32,
13503    #[doc = "Pitch angle"]
13504    pub pitch: f32,
13505    #[doc = "Yaw angle"]
13506    pub yaw: f32,
13507    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
13508    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13509    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13510    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13511    pub covariance: [f32; 21],
13512    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
13513    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13514    pub reset_counter: u8,
13515}
13516impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13517    pub const ENCODED_LEN: usize = 117usize;
13518    pub const DEFAULT: Self = Self {
13519        usec: 0_u64,
13520        x: 0.0_f32,
13521        y: 0.0_f32,
13522        z: 0.0_f32,
13523        roll: 0.0_f32,
13524        pitch: 0.0_f32,
13525        yaw: 0.0_f32,
13526        covariance: [0.0_f32; 21usize],
13527        reset_counter: 0_u8,
13528    };
13529    #[cfg(feature = "arbitrary")]
13530    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13531        use arbitrary::{Arbitrary, Unstructured};
13532        let mut buf = [0u8; 1024];
13533        rng.fill_bytes(&mut buf);
13534        let mut unstructured = Unstructured::new(&buf);
13535        Self::arbitrary(&mut unstructured).unwrap_or_default()
13536    }
13537}
13538impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13539    fn default() -> Self {
13540        Self::DEFAULT.clone()
13541    }
13542}
13543impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13544    type Message = MavMessage;
13545    const ID: u32 = 101u32;
13546    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
13547    const EXTRA_CRC: u8 = 102u8;
13548    const ENCODED_LEN: usize = 117usize;
13549    fn deser(
13550        _version: MavlinkVersion,
13551        __input: &[u8],
13552    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13553        let avail_len = __input.len();
13554        let mut payload_buf = [0; Self::ENCODED_LEN];
13555        let mut buf = if avail_len < Self::ENCODED_LEN {
13556            payload_buf[0..avail_len].copy_from_slice(__input);
13557            Bytes::new(&payload_buf)
13558        } else {
13559            Bytes::new(__input)
13560        };
13561        let mut __struct = Self::default();
13562        __struct.usec = buf.get_u64_le();
13563        __struct.x = buf.get_f32_le();
13564        __struct.y = buf.get_f32_le();
13565        __struct.z = buf.get_f32_le();
13566        __struct.roll = buf.get_f32_le();
13567        __struct.pitch = buf.get_f32_le();
13568        __struct.yaw = buf.get_f32_le();
13569        for v in &mut __struct.covariance {
13570            let val = buf.get_f32_le();
13571            *v = val;
13572        }
13573        __struct.reset_counter = buf.get_u8();
13574        Ok(__struct)
13575    }
13576    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13577        let mut __tmp = BytesMut::new(bytes);
13578        #[allow(clippy::absurd_extreme_comparisons)]
13579        #[allow(unused_comparisons)]
13580        if __tmp.remaining() < Self::ENCODED_LEN {
13581            panic!(
13582                "buffer is too small (need {} bytes, but got {})",
13583                Self::ENCODED_LEN,
13584                __tmp.remaining(),
13585            )
13586        }
13587        __tmp.put_u64_le(self.usec);
13588        __tmp.put_f32_le(self.x);
13589        __tmp.put_f32_le(self.y);
13590        __tmp.put_f32_le(self.z);
13591        __tmp.put_f32_le(self.roll);
13592        __tmp.put_f32_le(self.pitch);
13593        __tmp.put_f32_le(self.yaw);
13594        if matches!(version, MavlinkVersion::V2) {
13595            for val in &self.covariance {
13596                __tmp.put_f32_le(*val);
13597            }
13598            __tmp.put_u8(self.reset_counter);
13599            let len = __tmp.len();
13600            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13601        } else {
13602            __tmp.len()
13603        }
13604    }
13605}
13606#[doc = "Second GPS data."]
13607#[doc = ""]
13608#[doc = "ID: 124"]
13609#[derive(Debug, Clone, PartialEq)]
13610#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13611#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13612#[cfg_attr(feature = "ts", derive(TS))]
13613#[cfg_attr(feature = "ts", ts(export))]
13614pub struct GPS2_RAW_DATA {
13615    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13616    pub time_usec: u64,
13617    #[doc = "Latitude (WGS84)"]
13618    pub lat: i32,
13619    #[doc = "Longitude (WGS84)"]
13620    pub lon: i32,
13621    #[doc = "Altitude (MSL). Positive for up."]
13622    pub alt: i32,
13623    #[doc = "Age of DGPS info"]
13624    pub dgps_age: u32,
13625    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13626    pub eph: u16,
13627    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13628    pub epv: u16,
13629    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
13630    pub vel: u16,
13631    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13632    pub cog: u16,
13633    #[doc = "GPS fix type."]
13634    pub fix_type: GpsFixType,
13635    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
13636    pub satellites_visible: u8,
13637    #[doc = "Number of DGPS satellites"]
13638    pub dgps_numch: u8,
13639    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
13640    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13641    pub yaw: u16,
13642    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
13643    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13644    pub alt_ellipsoid: i32,
13645    #[doc = "Position uncertainty."]
13646    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13647    pub h_acc: u32,
13648    #[doc = "Altitude uncertainty."]
13649    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13650    pub v_acc: u32,
13651    #[doc = "Speed uncertainty."]
13652    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13653    pub vel_acc: u32,
13654    #[doc = "Heading / track uncertainty"]
13655    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13656    pub hdg_acc: u32,
13657}
13658impl GPS2_RAW_DATA {
13659    pub const ENCODED_LEN: usize = 57usize;
13660    pub const DEFAULT: Self = Self {
13661        time_usec: 0_u64,
13662        lat: 0_i32,
13663        lon: 0_i32,
13664        alt: 0_i32,
13665        dgps_age: 0_u32,
13666        eph: 0_u16,
13667        epv: 0_u16,
13668        vel: 0_u16,
13669        cog: 0_u16,
13670        fix_type: GpsFixType::DEFAULT,
13671        satellites_visible: 0_u8,
13672        dgps_numch: 0_u8,
13673        yaw: 0_u16,
13674        alt_ellipsoid: 0_i32,
13675        h_acc: 0_u32,
13676        v_acc: 0_u32,
13677        vel_acc: 0_u32,
13678        hdg_acc: 0_u32,
13679    };
13680    #[cfg(feature = "arbitrary")]
13681    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13682        use arbitrary::{Arbitrary, Unstructured};
13683        let mut buf = [0u8; 1024];
13684        rng.fill_bytes(&mut buf);
13685        let mut unstructured = Unstructured::new(&buf);
13686        Self::arbitrary(&mut unstructured).unwrap_or_default()
13687    }
13688}
13689impl Default for GPS2_RAW_DATA {
13690    fn default() -> Self {
13691        Self::DEFAULT.clone()
13692    }
13693}
13694impl MessageData for GPS2_RAW_DATA {
13695    type Message = MavMessage;
13696    const ID: u32 = 124u32;
13697    const NAME: &'static str = "GPS2_RAW";
13698    const EXTRA_CRC: u8 = 87u8;
13699    const ENCODED_LEN: usize = 57usize;
13700    fn deser(
13701        _version: MavlinkVersion,
13702        __input: &[u8],
13703    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13704        let avail_len = __input.len();
13705        let mut payload_buf = [0; Self::ENCODED_LEN];
13706        let mut buf = if avail_len < Self::ENCODED_LEN {
13707            payload_buf[0..avail_len].copy_from_slice(__input);
13708            Bytes::new(&payload_buf)
13709        } else {
13710            Bytes::new(__input)
13711        };
13712        let mut __struct = Self::default();
13713        __struct.time_usec = buf.get_u64_le();
13714        __struct.lat = buf.get_i32_le();
13715        __struct.lon = buf.get_i32_le();
13716        __struct.alt = buf.get_i32_le();
13717        __struct.dgps_age = buf.get_u32_le();
13718        __struct.eph = buf.get_u16_le();
13719        __struct.epv = buf.get_u16_le();
13720        __struct.vel = buf.get_u16_le();
13721        __struct.cog = buf.get_u16_le();
13722        let tmp = buf.get_u8();
13723        __struct.fix_type =
13724            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13725                enum_type: "GpsFixType",
13726                value: tmp as u32,
13727            })?;
13728        __struct.satellites_visible = buf.get_u8();
13729        __struct.dgps_numch = buf.get_u8();
13730        __struct.yaw = buf.get_u16_le();
13731        __struct.alt_ellipsoid = buf.get_i32_le();
13732        __struct.h_acc = buf.get_u32_le();
13733        __struct.v_acc = buf.get_u32_le();
13734        __struct.vel_acc = buf.get_u32_le();
13735        __struct.hdg_acc = buf.get_u32_le();
13736        Ok(__struct)
13737    }
13738    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13739        let mut __tmp = BytesMut::new(bytes);
13740        #[allow(clippy::absurd_extreme_comparisons)]
13741        #[allow(unused_comparisons)]
13742        if __tmp.remaining() < Self::ENCODED_LEN {
13743            panic!(
13744                "buffer is too small (need {} bytes, but got {})",
13745                Self::ENCODED_LEN,
13746                __tmp.remaining(),
13747            )
13748        }
13749        __tmp.put_u64_le(self.time_usec);
13750        __tmp.put_i32_le(self.lat);
13751        __tmp.put_i32_le(self.lon);
13752        __tmp.put_i32_le(self.alt);
13753        __tmp.put_u32_le(self.dgps_age);
13754        __tmp.put_u16_le(self.eph);
13755        __tmp.put_u16_le(self.epv);
13756        __tmp.put_u16_le(self.vel);
13757        __tmp.put_u16_le(self.cog);
13758        __tmp.put_u8(self.fix_type as u8);
13759        __tmp.put_u8(self.satellites_visible);
13760        __tmp.put_u8(self.dgps_numch);
13761        if matches!(version, MavlinkVersion::V2) {
13762            __tmp.put_u16_le(self.yaw);
13763            __tmp.put_i32_le(self.alt_ellipsoid);
13764            __tmp.put_u32_le(self.h_acc);
13765            __tmp.put_u32_le(self.v_acc);
13766            __tmp.put_u32_le(self.vel_acc);
13767            __tmp.put_u32_le(self.hdg_acc);
13768            let len = __tmp.len();
13769            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13770        } else {
13771            __tmp.len()
13772        }
13773    }
13774}
13775#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
13776#[doc = ""]
13777#[doc = "ID: 128"]
13778#[derive(Debug, Clone, PartialEq)]
13779#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13780#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13781#[cfg_attr(feature = "ts", derive(TS))]
13782#[cfg_attr(feature = "ts", ts(export))]
13783pub struct GPS2_RTK_DATA {
13784    #[doc = "Time since boot of last baseline message received."]
13785    pub time_last_baseline_ms: u32,
13786    #[doc = "GPS Time of Week of last baseline"]
13787    pub tow: u32,
13788    #[doc = "Current baseline in ECEF x or NED north component."]
13789    pub baseline_a_mm: i32,
13790    #[doc = "Current baseline in ECEF y or NED east component."]
13791    pub baseline_b_mm: i32,
13792    #[doc = "Current baseline in ECEF z or NED down component."]
13793    pub baseline_c_mm: i32,
13794    #[doc = "Current estimate of baseline accuracy."]
13795    pub accuracy: u32,
13796    #[doc = "Current number of integer ambiguity hypotheses."]
13797    pub iar_num_hypotheses: i32,
13798    #[doc = "GPS Week Number of last baseline"]
13799    pub wn: u16,
13800    #[doc = "Identification of connected RTK receiver."]
13801    pub rtk_receiver_id: u8,
13802    #[doc = "GPS-specific health report for RTK data."]
13803    pub rtk_health: u8,
13804    #[doc = "Rate of baseline messages being received by GPS"]
13805    pub rtk_rate: u8,
13806    #[doc = "Current number of sats used for RTK calculation."]
13807    pub nsats: u8,
13808    #[doc = "Coordinate system of baseline"]
13809    pub baseline_coords_type: RtkBaselineCoordinateSystem,
13810}
13811impl GPS2_RTK_DATA {
13812    pub const ENCODED_LEN: usize = 35usize;
13813    pub const DEFAULT: Self = Self {
13814        time_last_baseline_ms: 0_u32,
13815        tow: 0_u32,
13816        baseline_a_mm: 0_i32,
13817        baseline_b_mm: 0_i32,
13818        baseline_c_mm: 0_i32,
13819        accuracy: 0_u32,
13820        iar_num_hypotheses: 0_i32,
13821        wn: 0_u16,
13822        rtk_receiver_id: 0_u8,
13823        rtk_health: 0_u8,
13824        rtk_rate: 0_u8,
13825        nsats: 0_u8,
13826        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
13827    };
13828    #[cfg(feature = "arbitrary")]
13829    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13830        use arbitrary::{Arbitrary, Unstructured};
13831        let mut buf = [0u8; 1024];
13832        rng.fill_bytes(&mut buf);
13833        let mut unstructured = Unstructured::new(&buf);
13834        Self::arbitrary(&mut unstructured).unwrap_or_default()
13835    }
13836}
13837impl Default for GPS2_RTK_DATA {
13838    fn default() -> Self {
13839        Self::DEFAULT.clone()
13840    }
13841}
13842impl MessageData for GPS2_RTK_DATA {
13843    type Message = MavMessage;
13844    const ID: u32 = 128u32;
13845    const NAME: &'static str = "GPS2_RTK";
13846    const EXTRA_CRC: u8 = 226u8;
13847    const ENCODED_LEN: usize = 35usize;
13848    fn deser(
13849        _version: MavlinkVersion,
13850        __input: &[u8],
13851    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13852        let avail_len = __input.len();
13853        let mut payload_buf = [0; Self::ENCODED_LEN];
13854        let mut buf = if avail_len < Self::ENCODED_LEN {
13855            payload_buf[0..avail_len].copy_from_slice(__input);
13856            Bytes::new(&payload_buf)
13857        } else {
13858            Bytes::new(__input)
13859        };
13860        let mut __struct = Self::default();
13861        __struct.time_last_baseline_ms = buf.get_u32_le();
13862        __struct.tow = buf.get_u32_le();
13863        __struct.baseline_a_mm = buf.get_i32_le();
13864        __struct.baseline_b_mm = buf.get_i32_le();
13865        __struct.baseline_c_mm = buf.get_i32_le();
13866        __struct.accuracy = buf.get_u32_le();
13867        __struct.iar_num_hypotheses = buf.get_i32_le();
13868        __struct.wn = buf.get_u16_le();
13869        __struct.rtk_receiver_id = buf.get_u8();
13870        __struct.rtk_health = buf.get_u8();
13871        __struct.rtk_rate = buf.get_u8();
13872        __struct.nsats = buf.get_u8();
13873        let tmp = buf.get_u8();
13874        __struct.baseline_coords_type =
13875            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13876                enum_type: "RtkBaselineCoordinateSystem",
13877                value: tmp as u32,
13878            })?;
13879        Ok(__struct)
13880    }
13881    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13882        let mut __tmp = BytesMut::new(bytes);
13883        #[allow(clippy::absurd_extreme_comparisons)]
13884        #[allow(unused_comparisons)]
13885        if __tmp.remaining() < Self::ENCODED_LEN {
13886            panic!(
13887                "buffer is too small (need {} bytes, but got {})",
13888                Self::ENCODED_LEN,
13889                __tmp.remaining(),
13890            )
13891        }
13892        __tmp.put_u32_le(self.time_last_baseline_ms);
13893        __tmp.put_u32_le(self.tow);
13894        __tmp.put_i32_le(self.baseline_a_mm);
13895        __tmp.put_i32_le(self.baseline_b_mm);
13896        __tmp.put_i32_le(self.baseline_c_mm);
13897        __tmp.put_u32_le(self.accuracy);
13898        __tmp.put_i32_le(self.iar_num_hypotheses);
13899        __tmp.put_u16_le(self.wn);
13900        __tmp.put_u8(self.rtk_receiver_id);
13901        __tmp.put_u8(self.rtk_health);
13902        __tmp.put_u8(self.rtk_rate);
13903        __tmp.put_u8(self.nsats);
13904        __tmp.put_u8(self.baseline_coords_type as u8);
13905        if matches!(version, MavlinkVersion::V2) {
13906            let len = __tmp.len();
13907            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13908        } else {
13909            __tmp.len()
13910        }
13911    }
13912}
13913#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
13914#[doc = ""]
13915#[doc = "ID: 49"]
13916#[derive(Debug, Clone, PartialEq)]
13917#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13918#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13919#[cfg_attr(feature = "ts", derive(TS))]
13920#[cfg_attr(feature = "ts", ts(export))]
13921pub struct GPS_GLOBAL_ORIGIN_DATA {
13922    #[doc = "Latitude (WGS84)"]
13923    pub latitude: i32,
13924    #[doc = "Longitude (WGS84)"]
13925    pub longitude: i32,
13926    #[doc = "Altitude (MSL). Positive for up."]
13927    pub altitude: i32,
13928    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13929    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13930    pub time_usec: u64,
13931}
13932impl GPS_GLOBAL_ORIGIN_DATA {
13933    pub const ENCODED_LEN: usize = 20usize;
13934    pub const DEFAULT: Self = Self {
13935        latitude: 0_i32,
13936        longitude: 0_i32,
13937        altitude: 0_i32,
13938        time_usec: 0_u64,
13939    };
13940    #[cfg(feature = "arbitrary")]
13941    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13942        use arbitrary::{Arbitrary, Unstructured};
13943        let mut buf = [0u8; 1024];
13944        rng.fill_bytes(&mut buf);
13945        let mut unstructured = Unstructured::new(&buf);
13946        Self::arbitrary(&mut unstructured).unwrap_or_default()
13947    }
13948}
13949impl Default for GPS_GLOBAL_ORIGIN_DATA {
13950    fn default() -> Self {
13951        Self::DEFAULT.clone()
13952    }
13953}
13954impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
13955    type Message = MavMessage;
13956    const ID: u32 = 49u32;
13957    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
13958    const EXTRA_CRC: u8 = 39u8;
13959    const ENCODED_LEN: usize = 20usize;
13960    fn deser(
13961        _version: MavlinkVersion,
13962        __input: &[u8],
13963    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13964        let avail_len = __input.len();
13965        let mut payload_buf = [0; Self::ENCODED_LEN];
13966        let mut buf = if avail_len < Self::ENCODED_LEN {
13967            payload_buf[0..avail_len].copy_from_slice(__input);
13968            Bytes::new(&payload_buf)
13969        } else {
13970            Bytes::new(__input)
13971        };
13972        let mut __struct = Self::default();
13973        __struct.latitude = buf.get_i32_le();
13974        __struct.longitude = buf.get_i32_le();
13975        __struct.altitude = buf.get_i32_le();
13976        __struct.time_usec = buf.get_u64_le();
13977        Ok(__struct)
13978    }
13979    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13980        let mut __tmp = BytesMut::new(bytes);
13981        #[allow(clippy::absurd_extreme_comparisons)]
13982        #[allow(unused_comparisons)]
13983        if __tmp.remaining() < Self::ENCODED_LEN {
13984            panic!(
13985                "buffer is too small (need {} bytes, but got {})",
13986                Self::ENCODED_LEN,
13987                __tmp.remaining(),
13988            )
13989        }
13990        __tmp.put_i32_le(self.latitude);
13991        __tmp.put_i32_le(self.longitude);
13992        __tmp.put_i32_le(self.altitude);
13993        if matches!(version, MavlinkVersion::V2) {
13994            __tmp.put_u64_le(self.time_usec);
13995            let len = __tmp.len();
13996            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13997        } else {
13998            __tmp.len()
13999        }
14000    }
14001}
14002#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14003#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14004#[doc = ""]
14005#[doc = "ID: 123"]
14006#[derive(Debug, Clone, PartialEq)]
14007#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14008#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14009#[cfg_attr(feature = "ts", derive(TS))]
14010#[cfg_attr(feature = "ts", ts(export))]
14011pub struct GPS_INJECT_DATA_DATA {
14012    #[doc = "System ID"]
14013    pub target_system: u8,
14014    #[doc = "Component ID"]
14015    pub target_component: u8,
14016    #[doc = "Data length"]
14017    pub len: u8,
14018    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14019    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14020    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14021    pub data: [u8; 110],
14022}
14023impl GPS_INJECT_DATA_DATA {
14024    pub const ENCODED_LEN: usize = 113usize;
14025    pub const DEFAULT: Self = Self {
14026        target_system: 0_u8,
14027        target_component: 0_u8,
14028        len: 0_u8,
14029        data: [0_u8; 110usize],
14030    };
14031    #[cfg(feature = "arbitrary")]
14032    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14033        use arbitrary::{Arbitrary, Unstructured};
14034        let mut buf = [0u8; 1024];
14035        rng.fill_bytes(&mut buf);
14036        let mut unstructured = Unstructured::new(&buf);
14037        Self::arbitrary(&mut unstructured).unwrap_or_default()
14038    }
14039}
14040impl Default for GPS_INJECT_DATA_DATA {
14041    fn default() -> Self {
14042        Self::DEFAULT.clone()
14043    }
14044}
14045impl MessageData for GPS_INJECT_DATA_DATA {
14046    type Message = MavMessage;
14047    const ID: u32 = 123u32;
14048    const NAME: &'static str = "GPS_INJECT_DATA";
14049    const EXTRA_CRC: u8 = 250u8;
14050    const ENCODED_LEN: usize = 113usize;
14051    fn deser(
14052        _version: MavlinkVersion,
14053        __input: &[u8],
14054    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14055        let avail_len = __input.len();
14056        let mut payload_buf = [0; Self::ENCODED_LEN];
14057        let mut buf = if avail_len < Self::ENCODED_LEN {
14058            payload_buf[0..avail_len].copy_from_slice(__input);
14059            Bytes::new(&payload_buf)
14060        } else {
14061            Bytes::new(__input)
14062        };
14063        let mut __struct = Self::default();
14064        __struct.target_system = buf.get_u8();
14065        __struct.target_component = buf.get_u8();
14066        __struct.len = buf.get_u8();
14067        for v in &mut __struct.data {
14068            let val = buf.get_u8();
14069            *v = val;
14070        }
14071        Ok(__struct)
14072    }
14073    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14074        let mut __tmp = BytesMut::new(bytes);
14075        #[allow(clippy::absurd_extreme_comparisons)]
14076        #[allow(unused_comparisons)]
14077        if __tmp.remaining() < Self::ENCODED_LEN {
14078            panic!(
14079                "buffer is too small (need {} bytes, but got {})",
14080                Self::ENCODED_LEN,
14081                __tmp.remaining(),
14082            )
14083        }
14084        __tmp.put_u8(self.target_system);
14085        __tmp.put_u8(self.target_component);
14086        __tmp.put_u8(self.len);
14087        for val in &self.data {
14088            __tmp.put_u8(*val);
14089        }
14090        if matches!(version, MavlinkVersion::V2) {
14091            let len = __tmp.len();
14092            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14093        } else {
14094            __tmp.len()
14095        }
14096    }
14097}
14098#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
14099#[doc = ""]
14100#[doc = "ID: 232"]
14101#[derive(Debug, Clone, PartialEq)]
14102#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14103#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14104#[cfg_attr(feature = "ts", derive(TS))]
14105#[cfg_attr(feature = "ts", ts(export))]
14106pub struct GPS_INPUT_DATA {
14107    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14108    pub time_usec: u64,
14109    #[doc = "GPS time (from start of GPS week)"]
14110    pub time_week_ms: u32,
14111    #[doc = "Latitude (WGS84)"]
14112    pub lat: i32,
14113    #[doc = "Longitude (WGS84)"]
14114    pub lon: i32,
14115    #[doc = "Altitude (MSL). Positive for up."]
14116    pub alt: f32,
14117    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14118    pub hdop: f32,
14119    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14120    pub vdop: f32,
14121    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
14122    pub vn: f32,
14123    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
14124    pub ve: f32,
14125    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
14126    pub vd: f32,
14127    #[doc = "GPS speed accuracy"]
14128    pub speed_accuracy: f32,
14129    #[doc = "GPS horizontal accuracy"]
14130    pub horiz_accuracy: f32,
14131    #[doc = "GPS vertical accuracy"]
14132    pub vert_accuracy: f32,
14133    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
14134    pub ignore_flags: GpsInputIgnoreFlags,
14135    #[doc = "GPS week number"]
14136    pub time_week: u16,
14137    #[doc = "ID of the GPS for multiple GPS inputs"]
14138    pub gps_id: u8,
14139    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
14140    pub fix_type: u8,
14141    #[doc = "Number of satellites visible."]
14142    pub satellites_visible: u8,
14143    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
14144    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14145    pub yaw: u16,
14146}
14147impl GPS_INPUT_DATA {
14148    pub const ENCODED_LEN: usize = 65usize;
14149    pub const DEFAULT: Self = Self {
14150        time_usec: 0_u64,
14151        time_week_ms: 0_u32,
14152        lat: 0_i32,
14153        lon: 0_i32,
14154        alt: 0.0_f32,
14155        hdop: 0.0_f32,
14156        vdop: 0.0_f32,
14157        vn: 0.0_f32,
14158        ve: 0.0_f32,
14159        vd: 0.0_f32,
14160        speed_accuracy: 0.0_f32,
14161        horiz_accuracy: 0.0_f32,
14162        vert_accuracy: 0.0_f32,
14163        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
14164        time_week: 0_u16,
14165        gps_id: 0_u8,
14166        fix_type: 0_u8,
14167        satellites_visible: 0_u8,
14168        yaw: 0_u16,
14169    };
14170    #[cfg(feature = "arbitrary")]
14171    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14172        use arbitrary::{Arbitrary, Unstructured};
14173        let mut buf = [0u8; 1024];
14174        rng.fill_bytes(&mut buf);
14175        let mut unstructured = Unstructured::new(&buf);
14176        Self::arbitrary(&mut unstructured).unwrap_or_default()
14177    }
14178}
14179impl Default for GPS_INPUT_DATA {
14180    fn default() -> Self {
14181        Self::DEFAULT.clone()
14182    }
14183}
14184impl MessageData for GPS_INPUT_DATA {
14185    type Message = MavMessage;
14186    const ID: u32 = 232u32;
14187    const NAME: &'static str = "GPS_INPUT";
14188    const EXTRA_CRC: u8 = 151u8;
14189    const ENCODED_LEN: usize = 65usize;
14190    fn deser(
14191        _version: MavlinkVersion,
14192        __input: &[u8],
14193    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14194        let avail_len = __input.len();
14195        let mut payload_buf = [0; Self::ENCODED_LEN];
14196        let mut buf = if avail_len < Self::ENCODED_LEN {
14197            payload_buf[0..avail_len].copy_from_slice(__input);
14198            Bytes::new(&payload_buf)
14199        } else {
14200            Bytes::new(__input)
14201        };
14202        let mut __struct = Self::default();
14203        __struct.time_usec = buf.get_u64_le();
14204        __struct.time_week_ms = buf.get_u32_le();
14205        __struct.lat = buf.get_i32_le();
14206        __struct.lon = buf.get_i32_le();
14207        __struct.alt = buf.get_f32_le();
14208        __struct.hdop = buf.get_f32_le();
14209        __struct.vdop = buf.get_f32_le();
14210        __struct.vn = buf.get_f32_le();
14211        __struct.ve = buf.get_f32_le();
14212        __struct.vd = buf.get_f32_le();
14213        __struct.speed_accuracy = buf.get_f32_le();
14214        __struct.horiz_accuracy = buf.get_f32_le();
14215        __struct.vert_accuracy = buf.get_f32_le();
14216        let tmp = buf.get_u16_le();
14217        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
14218            tmp & GpsInputIgnoreFlags::all().bits(),
14219        )
14220        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14221            flag_type: "GpsInputIgnoreFlags",
14222            value: tmp as u32,
14223        })?;
14224        __struct.time_week = buf.get_u16_le();
14225        __struct.gps_id = buf.get_u8();
14226        __struct.fix_type = buf.get_u8();
14227        __struct.satellites_visible = buf.get_u8();
14228        __struct.yaw = buf.get_u16_le();
14229        Ok(__struct)
14230    }
14231    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14232        let mut __tmp = BytesMut::new(bytes);
14233        #[allow(clippy::absurd_extreme_comparisons)]
14234        #[allow(unused_comparisons)]
14235        if __tmp.remaining() < Self::ENCODED_LEN {
14236            panic!(
14237                "buffer is too small (need {} bytes, but got {})",
14238                Self::ENCODED_LEN,
14239                __tmp.remaining(),
14240            )
14241        }
14242        __tmp.put_u64_le(self.time_usec);
14243        __tmp.put_u32_le(self.time_week_ms);
14244        __tmp.put_i32_le(self.lat);
14245        __tmp.put_i32_le(self.lon);
14246        __tmp.put_f32_le(self.alt);
14247        __tmp.put_f32_le(self.hdop);
14248        __tmp.put_f32_le(self.vdop);
14249        __tmp.put_f32_le(self.vn);
14250        __tmp.put_f32_le(self.ve);
14251        __tmp.put_f32_le(self.vd);
14252        __tmp.put_f32_le(self.speed_accuracy);
14253        __tmp.put_f32_le(self.horiz_accuracy);
14254        __tmp.put_f32_le(self.vert_accuracy);
14255        __tmp.put_u16_le(self.ignore_flags.bits());
14256        __tmp.put_u16_le(self.time_week);
14257        __tmp.put_u8(self.gps_id);
14258        __tmp.put_u8(self.fix_type);
14259        __tmp.put_u8(self.satellites_visible);
14260        if matches!(version, MavlinkVersion::V2) {
14261            __tmp.put_u16_le(self.yaw);
14262            let len = __tmp.len();
14263            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14264        } else {
14265            __tmp.len()
14266        }
14267    }
14268}
14269#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
14270#[doc = ""]
14271#[doc = "ID: 24"]
14272#[derive(Debug, Clone, PartialEq)]
14273#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14274#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14275#[cfg_attr(feature = "ts", derive(TS))]
14276#[cfg_attr(feature = "ts", ts(export))]
14277pub struct GPS_RAW_INT_DATA {
14278    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14279    pub time_usec: u64,
14280    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
14281    pub lat: i32,
14282    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
14283    pub lon: i32,
14284    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
14285    pub alt: i32,
14286    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14287    pub eph: u16,
14288    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14289    pub epv: u16,
14290    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14291    pub vel: u16,
14292    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14293    pub cog: u16,
14294    #[doc = "GPS fix type."]
14295    pub fix_type: GpsFixType,
14296    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14297    pub satellites_visible: u8,
14298    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14299    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14300    pub alt_ellipsoid: i32,
14301    #[doc = "Position uncertainty."]
14302    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14303    pub h_acc: u32,
14304    #[doc = "Altitude uncertainty."]
14305    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14306    pub v_acc: u32,
14307    #[doc = "Speed uncertainty."]
14308    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14309    pub vel_acc: u32,
14310    #[doc = "Heading / track uncertainty"]
14311    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14312    pub hdg_acc: u32,
14313    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14314    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14315    pub yaw: u16,
14316}
14317impl GPS_RAW_INT_DATA {
14318    pub const ENCODED_LEN: usize = 52usize;
14319    pub const DEFAULT: Self = Self {
14320        time_usec: 0_u64,
14321        lat: 0_i32,
14322        lon: 0_i32,
14323        alt: 0_i32,
14324        eph: 0_u16,
14325        epv: 0_u16,
14326        vel: 0_u16,
14327        cog: 0_u16,
14328        fix_type: GpsFixType::DEFAULT,
14329        satellites_visible: 0_u8,
14330        alt_ellipsoid: 0_i32,
14331        h_acc: 0_u32,
14332        v_acc: 0_u32,
14333        vel_acc: 0_u32,
14334        hdg_acc: 0_u32,
14335        yaw: 0_u16,
14336    };
14337    #[cfg(feature = "arbitrary")]
14338    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14339        use arbitrary::{Arbitrary, Unstructured};
14340        let mut buf = [0u8; 1024];
14341        rng.fill_bytes(&mut buf);
14342        let mut unstructured = Unstructured::new(&buf);
14343        Self::arbitrary(&mut unstructured).unwrap_or_default()
14344    }
14345}
14346impl Default for GPS_RAW_INT_DATA {
14347    fn default() -> Self {
14348        Self::DEFAULT.clone()
14349    }
14350}
14351impl MessageData for GPS_RAW_INT_DATA {
14352    type Message = MavMessage;
14353    const ID: u32 = 24u32;
14354    const NAME: &'static str = "GPS_RAW_INT";
14355    const EXTRA_CRC: u8 = 24u8;
14356    const ENCODED_LEN: usize = 52usize;
14357    fn deser(
14358        _version: MavlinkVersion,
14359        __input: &[u8],
14360    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14361        let avail_len = __input.len();
14362        let mut payload_buf = [0; Self::ENCODED_LEN];
14363        let mut buf = if avail_len < Self::ENCODED_LEN {
14364            payload_buf[0..avail_len].copy_from_slice(__input);
14365            Bytes::new(&payload_buf)
14366        } else {
14367            Bytes::new(__input)
14368        };
14369        let mut __struct = Self::default();
14370        __struct.time_usec = buf.get_u64_le();
14371        __struct.lat = buf.get_i32_le();
14372        __struct.lon = buf.get_i32_le();
14373        __struct.alt = buf.get_i32_le();
14374        __struct.eph = buf.get_u16_le();
14375        __struct.epv = buf.get_u16_le();
14376        __struct.vel = buf.get_u16_le();
14377        __struct.cog = buf.get_u16_le();
14378        let tmp = buf.get_u8();
14379        __struct.fix_type =
14380            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14381                enum_type: "GpsFixType",
14382                value: tmp as u32,
14383            })?;
14384        __struct.satellites_visible = buf.get_u8();
14385        __struct.alt_ellipsoid = buf.get_i32_le();
14386        __struct.h_acc = buf.get_u32_le();
14387        __struct.v_acc = buf.get_u32_le();
14388        __struct.vel_acc = buf.get_u32_le();
14389        __struct.hdg_acc = buf.get_u32_le();
14390        __struct.yaw = buf.get_u16_le();
14391        Ok(__struct)
14392    }
14393    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14394        let mut __tmp = BytesMut::new(bytes);
14395        #[allow(clippy::absurd_extreme_comparisons)]
14396        #[allow(unused_comparisons)]
14397        if __tmp.remaining() < Self::ENCODED_LEN {
14398            panic!(
14399                "buffer is too small (need {} bytes, but got {})",
14400                Self::ENCODED_LEN,
14401                __tmp.remaining(),
14402            )
14403        }
14404        __tmp.put_u64_le(self.time_usec);
14405        __tmp.put_i32_le(self.lat);
14406        __tmp.put_i32_le(self.lon);
14407        __tmp.put_i32_le(self.alt);
14408        __tmp.put_u16_le(self.eph);
14409        __tmp.put_u16_le(self.epv);
14410        __tmp.put_u16_le(self.vel);
14411        __tmp.put_u16_le(self.cog);
14412        __tmp.put_u8(self.fix_type as u8);
14413        __tmp.put_u8(self.satellites_visible);
14414        if matches!(version, MavlinkVersion::V2) {
14415            __tmp.put_i32_le(self.alt_ellipsoid);
14416            __tmp.put_u32_le(self.h_acc);
14417            __tmp.put_u32_le(self.v_acc);
14418            __tmp.put_u32_le(self.vel_acc);
14419            __tmp.put_u32_le(self.hdg_acc);
14420            __tmp.put_u16_le(self.yaw);
14421            let len = __tmp.len();
14422            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14423        } else {
14424            __tmp.len()
14425        }
14426    }
14427}
14428#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
14429#[doc = ""]
14430#[doc = "ID: 233"]
14431#[derive(Debug, Clone, PartialEq)]
14432#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14433#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14434#[cfg_attr(feature = "ts", derive(TS))]
14435#[cfg_attr(feature = "ts", ts(export))]
14436pub struct GPS_RTCM_DATA_DATA {
14437    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
14438    pub flags: u8,
14439    #[doc = "data length"]
14440    pub len: u8,
14441    #[doc = "RTCM message (may be fragmented)"]
14442    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14443    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14444    pub data: [u8; 180],
14445}
14446impl GPS_RTCM_DATA_DATA {
14447    pub const ENCODED_LEN: usize = 182usize;
14448    pub const DEFAULT: Self = Self {
14449        flags: 0_u8,
14450        len: 0_u8,
14451        data: [0_u8; 180usize],
14452    };
14453    #[cfg(feature = "arbitrary")]
14454    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14455        use arbitrary::{Arbitrary, Unstructured};
14456        let mut buf = [0u8; 1024];
14457        rng.fill_bytes(&mut buf);
14458        let mut unstructured = Unstructured::new(&buf);
14459        Self::arbitrary(&mut unstructured).unwrap_or_default()
14460    }
14461}
14462impl Default for GPS_RTCM_DATA_DATA {
14463    fn default() -> Self {
14464        Self::DEFAULT.clone()
14465    }
14466}
14467impl MessageData for GPS_RTCM_DATA_DATA {
14468    type Message = MavMessage;
14469    const ID: u32 = 233u32;
14470    const NAME: &'static str = "GPS_RTCM_DATA";
14471    const EXTRA_CRC: u8 = 35u8;
14472    const ENCODED_LEN: usize = 182usize;
14473    fn deser(
14474        _version: MavlinkVersion,
14475        __input: &[u8],
14476    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14477        let avail_len = __input.len();
14478        let mut payload_buf = [0; Self::ENCODED_LEN];
14479        let mut buf = if avail_len < Self::ENCODED_LEN {
14480            payload_buf[0..avail_len].copy_from_slice(__input);
14481            Bytes::new(&payload_buf)
14482        } else {
14483            Bytes::new(__input)
14484        };
14485        let mut __struct = Self::default();
14486        __struct.flags = buf.get_u8();
14487        __struct.len = buf.get_u8();
14488        for v in &mut __struct.data {
14489            let val = buf.get_u8();
14490            *v = val;
14491        }
14492        Ok(__struct)
14493    }
14494    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14495        let mut __tmp = BytesMut::new(bytes);
14496        #[allow(clippy::absurd_extreme_comparisons)]
14497        #[allow(unused_comparisons)]
14498        if __tmp.remaining() < Self::ENCODED_LEN {
14499            panic!(
14500                "buffer is too small (need {} bytes, but got {})",
14501                Self::ENCODED_LEN,
14502                __tmp.remaining(),
14503            )
14504        }
14505        __tmp.put_u8(self.flags);
14506        __tmp.put_u8(self.len);
14507        for val in &self.data {
14508            __tmp.put_u8(*val);
14509        }
14510        if matches!(version, MavlinkVersion::V2) {
14511            let len = __tmp.len();
14512            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14513        } else {
14514            __tmp.len()
14515        }
14516    }
14517}
14518#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14519#[doc = ""]
14520#[doc = "ID: 127"]
14521#[derive(Debug, Clone, PartialEq)]
14522#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14523#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14524#[cfg_attr(feature = "ts", derive(TS))]
14525#[cfg_attr(feature = "ts", ts(export))]
14526pub struct GPS_RTK_DATA {
14527    #[doc = "Time since boot of last baseline message received."]
14528    pub time_last_baseline_ms: u32,
14529    #[doc = "GPS Time of Week of last baseline"]
14530    pub tow: u32,
14531    #[doc = "Current baseline in ECEF x or NED north component."]
14532    pub baseline_a_mm: i32,
14533    #[doc = "Current baseline in ECEF y or NED east component."]
14534    pub baseline_b_mm: i32,
14535    #[doc = "Current baseline in ECEF z or NED down component."]
14536    pub baseline_c_mm: i32,
14537    #[doc = "Current estimate of baseline accuracy."]
14538    pub accuracy: u32,
14539    #[doc = "Current number of integer ambiguity hypotheses."]
14540    pub iar_num_hypotheses: i32,
14541    #[doc = "GPS Week Number of last baseline"]
14542    pub wn: u16,
14543    #[doc = "Identification of connected RTK receiver."]
14544    pub rtk_receiver_id: u8,
14545    #[doc = "GPS-specific health report for RTK data."]
14546    pub rtk_health: u8,
14547    #[doc = "Rate of baseline messages being received by GPS"]
14548    pub rtk_rate: u8,
14549    #[doc = "Current number of sats used for RTK calculation."]
14550    pub nsats: u8,
14551    #[doc = "Coordinate system of baseline"]
14552    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14553}
14554impl GPS_RTK_DATA {
14555    pub const ENCODED_LEN: usize = 35usize;
14556    pub const DEFAULT: Self = Self {
14557        time_last_baseline_ms: 0_u32,
14558        tow: 0_u32,
14559        baseline_a_mm: 0_i32,
14560        baseline_b_mm: 0_i32,
14561        baseline_c_mm: 0_i32,
14562        accuracy: 0_u32,
14563        iar_num_hypotheses: 0_i32,
14564        wn: 0_u16,
14565        rtk_receiver_id: 0_u8,
14566        rtk_health: 0_u8,
14567        rtk_rate: 0_u8,
14568        nsats: 0_u8,
14569        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14570    };
14571    #[cfg(feature = "arbitrary")]
14572    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14573        use arbitrary::{Arbitrary, Unstructured};
14574        let mut buf = [0u8; 1024];
14575        rng.fill_bytes(&mut buf);
14576        let mut unstructured = Unstructured::new(&buf);
14577        Self::arbitrary(&mut unstructured).unwrap_or_default()
14578    }
14579}
14580impl Default for GPS_RTK_DATA {
14581    fn default() -> Self {
14582        Self::DEFAULT.clone()
14583    }
14584}
14585impl MessageData for GPS_RTK_DATA {
14586    type Message = MavMessage;
14587    const ID: u32 = 127u32;
14588    const NAME: &'static str = "GPS_RTK";
14589    const EXTRA_CRC: u8 = 25u8;
14590    const ENCODED_LEN: usize = 35usize;
14591    fn deser(
14592        _version: MavlinkVersion,
14593        __input: &[u8],
14594    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14595        let avail_len = __input.len();
14596        let mut payload_buf = [0; Self::ENCODED_LEN];
14597        let mut buf = if avail_len < Self::ENCODED_LEN {
14598            payload_buf[0..avail_len].copy_from_slice(__input);
14599            Bytes::new(&payload_buf)
14600        } else {
14601            Bytes::new(__input)
14602        };
14603        let mut __struct = Self::default();
14604        __struct.time_last_baseline_ms = buf.get_u32_le();
14605        __struct.tow = buf.get_u32_le();
14606        __struct.baseline_a_mm = buf.get_i32_le();
14607        __struct.baseline_b_mm = buf.get_i32_le();
14608        __struct.baseline_c_mm = buf.get_i32_le();
14609        __struct.accuracy = buf.get_u32_le();
14610        __struct.iar_num_hypotheses = buf.get_i32_le();
14611        __struct.wn = buf.get_u16_le();
14612        __struct.rtk_receiver_id = buf.get_u8();
14613        __struct.rtk_health = buf.get_u8();
14614        __struct.rtk_rate = buf.get_u8();
14615        __struct.nsats = buf.get_u8();
14616        let tmp = buf.get_u8();
14617        __struct.baseline_coords_type =
14618            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14619                enum_type: "RtkBaselineCoordinateSystem",
14620                value: tmp as u32,
14621            })?;
14622        Ok(__struct)
14623    }
14624    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14625        let mut __tmp = BytesMut::new(bytes);
14626        #[allow(clippy::absurd_extreme_comparisons)]
14627        #[allow(unused_comparisons)]
14628        if __tmp.remaining() < Self::ENCODED_LEN {
14629            panic!(
14630                "buffer is too small (need {} bytes, but got {})",
14631                Self::ENCODED_LEN,
14632                __tmp.remaining(),
14633            )
14634        }
14635        __tmp.put_u32_le(self.time_last_baseline_ms);
14636        __tmp.put_u32_le(self.tow);
14637        __tmp.put_i32_le(self.baseline_a_mm);
14638        __tmp.put_i32_le(self.baseline_b_mm);
14639        __tmp.put_i32_le(self.baseline_c_mm);
14640        __tmp.put_u32_le(self.accuracy);
14641        __tmp.put_i32_le(self.iar_num_hypotheses);
14642        __tmp.put_u16_le(self.wn);
14643        __tmp.put_u8(self.rtk_receiver_id);
14644        __tmp.put_u8(self.rtk_health);
14645        __tmp.put_u8(self.rtk_rate);
14646        __tmp.put_u8(self.nsats);
14647        __tmp.put_u8(self.baseline_coords_type as u8);
14648        if matches!(version, MavlinkVersion::V2) {
14649            let len = __tmp.len();
14650            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14651        } else {
14652            __tmp.len()
14653        }
14654    }
14655}
14656#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
14657#[doc = ""]
14658#[doc = "ID: 25"]
14659#[derive(Debug, Clone, PartialEq)]
14660#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14661#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14662#[cfg_attr(feature = "ts", derive(TS))]
14663#[cfg_attr(feature = "ts", ts(export))]
14664pub struct GPS_STATUS_DATA {
14665    #[doc = "Number of satellites visible"]
14666    pub satellites_visible: u8,
14667    #[doc = "Global satellite ID"]
14668    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14669    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14670    pub satellite_prn: [u8; 20],
14671    #[doc = "0: Satellite not used, 1: used for localization"]
14672    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14673    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14674    pub satellite_used: [u8; 20],
14675    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
14676    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14677    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14678    pub satellite_elevation: [u8; 20],
14679    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
14680    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14681    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14682    pub satellite_azimuth: [u8; 20],
14683    #[doc = "Signal to noise ratio of satellite"]
14684    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14685    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14686    pub satellite_snr: [u8; 20],
14687}
14688impl GPS_STATUS_DATA {
14689    pub const ENCODED_LEN: usize = 101usize;
14690    pub const DEFAULT: Self = Self {
14691        satellites_visible: 0_u8,
14692        satellite_prn: [0_u8; 20usize],
14693        satellite_used: [0_u8; 20usize],
14694        satellite_elevation: [0_u8; 20usize],
14695        satellite_azimuth: [0_u8; 20usize],
14696        satellite_snr: [0_u8; 20usize],
14697    };
14698    #[cfg(feature = "arbitrary")]
14699    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14700        use arbitrary::{Arbitrary, Unstructured};
14701        let mut buf = [0u8; 1024];
14702        rng.fill_bytes(&mut buf);
14703        let mut unstructured = Unstructured::new(&buf);
14704        Self::arbitrary(&mut unstructured).unwrap_or_default()
14705    }
14706}
14707impl Default for GPS_STATUS_DATA {
14708    fn default() -> Self {
14709        Self::DEFAULT.clone()
14710    }
14711}
14712impl MessageData for GPS_STATUS_DATA {
14713    type Message = MavMessage;
14714    const ID: u32 = 25u32;
14715    const NAME: &'static str = "GPS_STATUS";
14716    const EXTRA_CRC: u8 = 23u8;
14717    const ENCODED_LEN: usize = 101usize;
14718    fn deser(
14719        _version: MavlinkVersion,
14720        __input: &[u8],
14721    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14722        let avail_len = __input.len();
14723        let mut payload_buf = [0; Self::ENCODED_LEN];
14724        let mut buf = if avail_len < Self::ENCODED_LEN {
14725            payload_buf[0..avail_len].copy_from_slice(__input);
14726            Bytes::new(&payload_buf)
14727        } else {
14728            Bytes::new(__input)
14729        };
14730        let mut __struct = Self::default();
14731        __struct.satellites_visible = buf.get_u8();
14732        for v in &mut __struct.satellite_prn {
14733            let val = buf.get_u8();
14734            *v = val;
14735        }
14736        for v in &mut __struct.satellite_used {
14737            let val = buf.get_u8();
14738            *v = val;
14739        }
14740        for v in &mut __struct.satellite_elevation {
14741            let val = buf.get_u8();
14742            *v = val;
14743        }
14744        for v in &mut __struct.satellite_azimuth {
14745            let val = buf.get_u8();
14746            *v = val;
14747        }
14748        for v in &mut __struct.satellite_snr {
14749            let val = buf.get_u8();
14750            *v = val;
14751        }
14752        Ok(__struct)
14753    }
14754    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14755        let mut __tmp = BytesMut::new(bytes);
14756        #[allow(clippy::absurd_extreme_comparisons)]
14757        #[allow(unused_comparisons)]
14758        if __tmp.remaining() < Self::ENCODED_LEN {
14759            panic!(
14760                "buffer is too small (need {} bytes, but got {})",
14761                Self::ENCODED_LEN,
14762                __tmp.remaining(),
14763            )
14764        }
14765        __tmp.put_u8(self.satellites_visible);
14766        for val in &self.satellite_prn {
14767            __tmp.put_u8(*val);
14768        }
14769        for val in &self.satellite_used {
14770            __tmp.put_u8(*val);
14771        }
14772        for val in &self.satellite_elevation {
14773            __tmp.put_u8(*val);
14774        }
14775        for val in &self.satellite_azimuth {
14776            __tmp.put_u8(*val);
14777        }
14778        for val in &self.satellite_snr {
14779            __tmp.put_u8(*val);
14780        }
14781        if matches!(version, MavlinkVersion::V2) {
14782            let len = __tmp.len();
14783            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14784        } else {
14785            __tmp.len()
14786        }
14787    }
14788}
14789#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
14790#[doc = ""]
14791#[doc = "ID: 0"]
14792#[derive(Debug, Clone, PartialEq)]
14793#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14794#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14795#[cfg_attr(feature = "ts", derive(TS))]
14796#[cfg_attr(feature = "ts", ts(export))]
14797pub struct HEARTBEAT_DATA {
14798    #[doc = "A bitfield for use for autopilot-specific flags"]
14799    pub custom_mode: u32,
14800    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
14801    pub mavtype: MavType,
14802    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
14803    pub autopilot: MavAutopilot,
14804    #[doc = "System mode bitmap."]
14805    pub base_mode: MavModeFlag,
14806    #[doc = "System status flag."]
14807    pub system_status: MavState,
14808    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
14809    pub mavlink_version: u8,
14810}
14811impl HEARTBEAT_DATA {
14812    pub const ENCODED_LEN: usize = 9usize;
14813    pub const DEFAULT: Self = Self {
14814        custom_mode: 0_u32,
14815        mavtype: MavType::DEFAULT,
14816        autopilot: MavAutopilot::DEFAULT,
14817        base_mode: MavModeFlag::DEFAULT,
14818        system_status: MavState::DEFAULT,
14819        mavlink_version: MINOR_MAVLINK_VERSION,
14820    };
14821    #[cfg(feature = "arbitrary")]
14822    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14823        use arbitrary::{Arbitrary, Unstructured};
14824        let mut buf = [0u8; 1024];
14825        rng.fill_bytes(&mut buf);
14826        let mut unstructured = Unstructured::new(&buf);
14827        Self::arbitrary(&mut unstructured).unwrap_or_default()
14828    }
14829}
14830impl Default for HEARTBEAT_DATA {
14831    fn default() -> Self {
14832        Self::DEFAULT.clone()
14833    }
14834}
14835impl MessageData for HEARTBEAT_DATA {
14836    type Message = MavMessage;
14837    const ID: u32 = 0u32;
14838    const NAME: &'static str = "HEARTBEAT";
14839    const EXTRA_CRC: u8 = 50u8;
14840    const ENCODED_LEN: usize = 9usize;
14841    fn deser(
14842        _version: MavlinkVersion,
14843        __input: &[u8],
14844    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14845        let avail_len = __input.len();
14846        let mut payload_buf = [0; Self::ENCODED_LEN];
14847        let mut buf = if avail_len < Self::ENCODED_LEN {
14848            payload_buf[0..avail_len].copy_from_slice(__input);
14849            Bytes::new(&payload_buf)
14850        } else {
14851            Bytes::new(__input)
14852        };
14853        let mut __struct = Self::default();
14854        __struct.custom_mode = buf.get_u32_le();
14855        let tmp = buf.get_u8();
14856        __struct.mavtype =
14857            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14858                enum_type: "MavType",
14859                value: tmp as u32,
14860            })?;
14861        let tmp = buf.get_u8();
14862        __struct.autopilot =
14863            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14864                enum_type: "MavAutopilot",
14865                value: tmp as u32,
14866            })?;
14867        let tmp = buf.get_u8();
14868        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
14869            ::mavlink_core::error::ParserError::InvalidFlag {
14870                flag_type: "MavModeFlag",
14871                value: tmp as u32,
14872            },
14873        )?;
14874        let tmp = buf.get_u8();
14875        __struct.system_status =
14876            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14877                enum_type: "MavState",
14878                value: tmp as u32,
14879            })?;
14880        __struct.mavlink_version = buf.get_u8();
14881        Ok(__struct)
14882    }
14883    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14884        let mut __tmp = BytesMut::new(bytes);
14885        #[allow(clippy::absurd_extreme_comparisons)]
14886        #[allow(unused_comparisons)]
14887        if __tmp.remaining() < Self::ENCODED_LEN {
14888            panic!(
14889                "buffer is too small (need {} bytes, but got {})",
14890                Self::ENCODED_LEN,
14891                __tmp.remaining(),
14892            )
14893        }
14894        __tmp.put_u32_le(self.custom_mode);
14895        __tmp.put_u8(self.mavtype as u8);
14896        __tmp.put_u8(self.autopilot as u8);
14897        __tmp.put_u8(self.base_mode.bits());
14898        __tmp.put_u8(self.system_status as u8);
14899        __tmp.put_u8(self.mavlink_version);
14900        if matches!(version, MavlinkVersion::V2) {
14901            let len = __tmp.len();
14902            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14903        } else {
14904            __tmp.len()
14905        }
14906    }
14907}
14908#[doc = "The IMU readings in SI units in NED body frame."]
14909#[doc = ""]
14910#[doc = "ID: 105"]
14911#[derive(Debug, Clone, PartialEq)]
14912#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14913#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14914#[cfg_attr(feature = "ts", derive(TS))]
14915#[cfg_attr(feature = "ts", ts(export))]
14916pub struct HIGHRES_IMU_DATA {
14917    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14918    pub time_usec: u64,
14919    #[doc = "X acceleration"]
14920    pub xacc: f32,
14921    #[doc = "Y acceleration"]
14922    pub yacc: f32,
14923    #[doc = "Z acceleration"]
14924    pub zacc: f32,
14925    #[doc = "Angular speed around X axis"]
14926    pub xgyro: f32,
14927    #[doc = "Angular speed around Y axis"]
14928    pub ygyro: f32,
14929    #[doc = "Angular speed around Z axis"]
14930    pub zgyro: f32,
14931    #[doc = "X Magnetic field"]
14932    pub xmag: f32,
14933    #[doc = "Y Magnetic field"]
14934    pub ymag: f32,
14935    #[doc = "Z Magnetic field"]
14936    pub zmag: f32,
14937    #[doc = "Absolute pressure"]
14938    pub abs_pressure: f32,
14939    #[doc = "Differential pressure"]
14940    pub diff_pressure: f32,
14941    #[doc = "Altitude calculated from pressure"]
14942    pub pressure_alt: f32,
14943    #[doc = "Temperature"]
14944    pub temperature: f32,
14945    #[doc = "Bitmap for fields that have updated since last message"]
14946    pub fields_updated: HighresImuUpdatedFlags,
14947    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
14948    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14949    pub id: u8,
14950}
14951impl HIGHRES_IMU_DATA {
14952    pub const ENCODED_LEN: usize = 63usize;
14953    pub const DEFAULT: Self = Self {
14954        time_usec: 0_u64,
14955        xacc: 0.0_f32,
14956        yacc: 0.0_f32,
14957        zacc: 0.0_f32,
14958        xgyro: 0.0_f32,
14959        ygyro: 0.0_f32,
14960        zgyro: 0.0_f32,
14961        xmag: 0.0_f32,
14962        ymag: 0.0_f32,
14963        zmag: 0.0_f32,
14964        abs_pressure: 0.0_f32,
14965        diff_pressure: 0.0_f32,
14966        pressure_alt: 0.0_f32,
14967        temperature: 0.0_f32,
14968        fields_updated: HighresImuUpdatedFlags::DEFAULT,
14969        id: 0_u8,
14970    };
14971    #[cfg(feature = "arbitrary")]
14972    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14973        use arbitrary::{Arbitrary, Unstructured};
14974        let mut buf = [0u8; 1024];
14975        rng.fill_bytes(&mut buf);
14976        let mut unstructured = Unstructured::new(&buf);
14977        Self::arbitrary(&mut unstructured).unwrap_or_default()
14978    }
14979}
14980impl Default for HIGHRES_IMU_DATA {
14981    fn default() -> Self {
14982        Self::DEFAULT.clone()
14983    }
14984}
14985impl MessageData for HIGHRES_IMU_DATA {
14986    type Message = MavMessage;
14987    const ID: u32 = 105u32;
14988    const NAME: &'static str = "HIGHRES_IMU";
14989    const EXTRA_CRC: u8 = 93u8;
14990    const ENCODED_LEN: usize = 63usize;
14991    fn deser(
14992        _version: MavlinkVersion,
14993        __input: &[u8],
14994    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14995        let avail_len = __input.len();
14996        let mut payload_buf = [0; Self::ENCODED_LEN];
14997        let mut buf = if avail_len < Self::ENCODED_LEN {
14998            payload_buf[0..avail_len].copy_from_slice(__input);
14999            Bytes::new(&payload_buf)
15000        } else {
15001            Bytes::new(__input)
15002        };
15003        let mut __struct = Self::default();
15004        __struct.time_usec = buf.get_u64_le();
15005        __struct.xacc = buf.get_f32_le();
15006        __struct.yacc = buf.get_f32_le();
15007        __struct.zacc = buf.get_f32_le();
15008        __struct.xgyro = buf.get_f32_le();
15009        __struct.ygyro = buf.get_f32_le();
15010        __struct.zgyro = buf.get_f32_le();
15011        __struct.xmag = buf.get_f32_le();
15012        __struct.ymag = buf.get_f32_le();
15013        __struct.zmag = buf.get_f32_le();
15014        __struct.abs_pressure = buf.get_f32_le();
15015        __struct.diff_pressure = buf.get_f32_le();
15016        __struct.pressure_alt = buf.get_f32_le();
15017        __struct.temperature = buf.get_f32_le();
15018        let tmp = buf.get_u16_le();
15019        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(
15020            tmp & HighresImuUpdatedFlags::all().bits(),
15021        )
15022        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15023            flag_type: "HighresImuUpdatedFlags",
15024            value: tmp as u32,
15025        })?;
15026        __struct.id = buf.get_u8();
15027        Ok(__struct)
15028    }
15029    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15030        let mut __tmp = BytesMut::new(bytes);
15031        #[allow(clippy::absurd_extreme_comparisons)]
15032        #[allow(unused_comparisons)]
15033        if __tmp.remaining() < Self::ENCODED_LEN {
15034            panic!(
15035                "buffer is too small (need {} bytes, but got {})",
15036                Self::ENCODED_LEN,
15037                __tmp.remaining(),
15038            )
15039        }
15040        __tmp.put_u64_le(self.time_usec);
15041        __tmp.put_f32_le(self.xacc);
15042        __tmp.put_f32_le(self.yacc);
15043        __tmp.put_f32_le(self.zacc);
15044        __tmp.put_f32_le(self.xgyro);
15045        __tmp.put_f32_le(self.ygyro);
15046        __tmp.put_f32_le(self.zgyro);
15047        __tmp.put_f32_le(self.xmag);
15048        __tmp.put_f32_le(self.ymag);
15049        __tmp.put_f32_le(self.zmag);
15050        __tmp.put_f32_le(self.abs_pressure);
15051        __tmp.put_f32_le(self.diff_pressure);
15052        __tmp.put_f32_le(self.pressure_alt);
15053        __tmp.put_f32_le(self.temperature);
15054        __tmp.put_u16_le(self.fields_updated.bits());
15055        if matches!(version, MavlinkVersion::V2) {
15056            __tmp.put_u8(self.id);
15057            let len = __tmp.len();
15058            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15059        } else {
15060            __tmp.len()
15061        }
15062    }
15063}
15064#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
15065#[doc = "Message appropriate for high latency connections like Iridium."]
15066#[doc = ""]
15067#[doc = "ID: 234"]
15068#[derive(Debug, Clone, PartialEq)]
15069#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15070#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15071#[cfg_attr(feature = "ts", derive(TS))]
15072#[cfg_attr(feature = "ts", ts(export))]
15073pub struct HIGH_LATENCY_DATA {
15074    #[doc = "A bitfield for use for autopilot-specific flags."]
15075    pub custom_mode: u32,
15076    #[doc = "Latitude"]
15077    pub latitude: i32,
15078    #[doc = "Longitude"]
15079    pub longitude: i32,
15080    #[doc = "roll"]
15081    pub roll: i16,
15082    #[doc = "pitch"]
15083    pub pitch: i16,
15084    #[doc = "heading"]
15085    pub heading: u16,
15086    #[doc = "heading setpoint"]
15087    pub heading_sp: i16,
15088    #[doc = "Altitude above mean sea level"]
15089    pub altitude_amsl: i16,
15090    #[doc = "Altitude setpoint relative to the home position"]
15091    pub altitude_sp: i16,
15092    #[doc = "distance to target"]
15093    pub wp_distance: u16,
15094    #[doc = "Bitmap of enabled system modes."]
15095    pub base_mode: MavModeFlag,
15096    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
15097    pub landed_state: MavLandedState,
15098    #[doc = "throttle (percentage)"]
15099    pub throttle: i8,
15100    #[doc = "airspeed"]
15101    pub airspeed: u8,
15102    #[doc = "airspeed setpoint"]
15103    pub airspeed_sp: u8,
15104    #[doc = "groundspeed"]
15105    pub groundspeed: u8,
15106    #[doc = "climb rate"]
15107    pub climb_rate: i8,
15108    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15109    pub gps_nsat: u8,
15110    #[doc = "GPS Fix type."]
15111    pub gps_fix_type: GpsFixType,
15112    #[doc = "Remaining battery (percentage)"]
15113    pub battery_remaining: u8,
15114    #[doc = "Autopilot temperature (degrees C)"]
15115    pub temperature: i8,
15116    #[doc = "Air temperature (degrees C) from airspeed sensor"]
15117    pub temperature_air: i8,
15118    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
15119    pub failsafe: u8,
15120    #[doc = "current waypoint number"]
15121    pub wp_num: u8,
15122}
15123impl HIGH_LATENCY_DATA {
15124    pub const ENCODED_LEN: usize = 40usize;
15125    pub const DEFAULT: Self = Self {
15126        custom_mode: 0_u32,
15127        latitude: 0_i32,
15128        longitude: 0_i32,
15129        roll: 0_i16,
15130        pitch: 0_i16,
15131        heading: 0_u16,
15132        heading_sp: 0_i16,
15133        altitude_amsl: 0_i16,
15134        altitude_sp: 0_i16,
15135        wp_distance: 0_u16,
15136        base_mode: MavModeFlag::DEFAULT,
15137        landed_state: MavLandedState::DEFAULT,
15138        throttle: 0_i8,
15139        airspeed: 0_u8,
15140        airspeed_sp: 0_u8,
15141        groundspeed: 0_u8,
15142        climb_rate: 0_i8,
15143        gps_nsat: 0_u8,
15144        gps_fix_type: GpsFixType::DEFAULT,
15145        battery_remaining: 0_u8,
15146        temperature: 0_i8,
15147        temperature_air: 0_i8,
15148        failsafe: 0_u8,
15149        wp_num: 0_u8,
15150    };
15151    #[cfg(feature = "arbitrary")]
15152    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15153        use arbitrary::{Arbitrary, Unstructured};
15154        let mut buf = [0u8; 1024];
15155        rng.fill_bytes(&mut buf);
15156        let mut unstructured = Unstructured::new(&buf);
15157        Self::arbitrary(&mut unstructured).unwrap_or_default()
15158    }
15159}
15160impl Default for HIGH_LATENCY_DATA {
15161    fn default() -> Self {
15162        Self::DEFAULT.clone()
15163    }
15164}
15165impl MessageData for HIGH_LATENCY_DATA {
15166    type Message = MavMessage;
15167    const ID: u32 = 234u32;
15168    const NAME: &'static str = "HIGH_LATENCY";
15169    const EXTRA_CRC: u8 = 150u8;
15170    const ENCODED_LEN: usize = 40usize;
15171    fn deser(
15172        _version: MavlinkVersion,
15173        __input: &[u8],
15174    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15175        let avail_len = __input.len();
15176        let mut payload_buf = [0; Self::ENCODED_LEN];
15177        let mut buf = if avail_len < Self::ENCODED_LEN {
15178            payload_buf[0..avail_len].copy_from_slice(__input);
15179            Bytes::new(&payload_buf)
15180        } else {
15181            Bytes::new(__input)
15182        };
15183        let mut __struct = Self::default();
15184        __struct.custom_mode = buf.get_u32_le();
15185        __struct.latitude = buf.get_i32_le();
15186        __struct.longitude = buf.get_i32_le();
15187        __struct.roll = buf.get_i16_le();
15188        __struct.pitch = buf.get_i16_le();
15189        __struct.heading = buf.get_u16_le();
15190        __struct.heading_sp = buf.get_i16_le();
15191        __struct.altitude_amsl = buf.get_i16_le();
15192        __struct.altitude_sp = buf.get_i16_le();
15193        __struct.wp_distance = buf.get_u16_le();
15194        let tmp = buf.get_u8();
15195        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15196            ::mavlink_core::error::ParserError::InvalidFlag {
15197                flag_type: "MavModeFlag",
15198                value: tmp as u32,
15199            },
15200        )?;
15201        let tmp = buf.get_u8();
15202        __struct.landed_state =
15203            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15204                enum_type: "MavLandedState",
15205                value: tmp as u32,
15206            })?;
15207        __struct.throttle = buf.get_i8();
15208        __struct.airspeed = buf.get_u8();
15209        __struct.airspeed_sp = buf.get_u8();
15210        __struct.groundspeed = buf.get_u8();
15211        __struct.climb_rate = buf.get_i8();
15212        __struct.gps_nsat = buf.get_u8();
15213        let tmp = buf.get_u8();
15214        __struct.gps_fix_type =
15215            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15216                enum_type: "GpsFixType",
15217                value: tmp as u32,
15218            })?;
15219        __struct.battery_remaining = buf.get_u8();
15220        __struct.temperature = buf.get_i8();
15221        __struct.temperature_air = buf.get_i8();
15222        __struct.failsafe = buf.get_u8();
15223        __struct.wp_num = buf.get_u8();
15224        Ok(__struct)
15225    }
15226    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15227        let mut __tmp = BytesMut::new(bytes);
15228        #[allow(clippy::absurd_extreme_comparisons)]
15229        #[allow(unused_comparisons)]
15230        if __tmp.remaining() < Self::ENCODED_LEN {
15231            panic!(
15232                "buffer is too small (need {} bytes, but got {})",
15233                Self::ENCODED_LEN,
15234                __tmp.remaining(),
15235            )
15236        }
15237        __tmp.put_u32_le(self.custom_mode);
15238        __tmp.put_i32_le(self.latitude);
15239        __tmp.put_i32_le(self.longitude);
15240        __tmp.put_i16_le(self.roll);
15241        __tmp.put_i16_le(self.pitch);
15242        __tmp.put_u16_le(self.heading);
15243        __tmp.put_i16_le(self.heading_sp);
15244        __tmp.put_i16_le(self.altitude_amsl);
15245        __tmp.put_i16_le(self.altitude_sp);
15246        __tmp.put_u16_le(self.wp_distance);
15247        __tmp.put_u8(self.base_mode.bits());
15248        __tmp.put_u8(self.landed_state as u8);
15249        __tmp.put_i8(self.throttle);
15250        __tmp.put_u8(self.airspeed);
15251        __tmp.put_u8(self.airspeed_sp);
15252        __tmp.put_u8(self.groundspeed);
15253        __tmp.put_i8(self.climb_rate);
15254        __tmp.put_u8(self.gps_nsat);
15255        __tmp.put_u8(self.gps_fix_type as u8);
15256        __tmp.put_u8(self.battery_remaining);
15257        __tmp.put_i8(self.temperature);
15258        __tmp.put_i8(self.temperature_air);
15259        __tmp.put_u8(self.failsafe);
15260        __tmp.put_u8(self.wp_num);
15261        if matches!(version, MavlinkVersion::V2) {
15262            let len = __tmp.len();
15263            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15264        } else {
15265            __tmp.len()
15266        }
15267    }
15268}
15269#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
15270#[doc = ""]
15271#[doc = "ID: 235"]
15272#[derive(Debug, Clone, PartialEq)]
15273#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15274#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15275#[cfg_attr(feature = "ts", derive(TS))]
15276#[cfg_attr(feature = "ts", ts(export))]
15277pub struct HIGH_LATENCY2_DATA {
15278    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
15279    pub timestamp: u32,
15280    #[doc = "Latitude"]
15281    pub latitude: i32,
15282    #[doc = "Longitude"]
15283    pub longitude: i32,
15284    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
15285    pub custom_mode: u16,
15286    #[doc = "Altitude above mean sea level"]
15287    pub altitude: i16,
15288    #[doc = "Altitude setpoint"]
15289    pub target_altitude: i16,
15290    #[doc = "Distance to target waypoint or position"]
15291    pub target_distance: u16,
15292    #[doc = "Current waypoint number"]
15293    pub wp_num: u16,
15294    #[doc = "Bitmap of failure flags."]
15295    pub failure_flags: HlFailureFlag,
15296    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
15297    pub mavtype: MavType,
15298    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15299    pub autopilot: MavAutopilot,
15300    #[doc = "Heading"]
15301    pub heading: u8,
15302    #[doc = "Heading setpoint"]
15303    pub target_heading: u8,
15304    #[doc = "Throttle"]
15305    pub throttle: u8,
15306    #[doc = "Airspeed"]
15307    pub airspeed: u8,
15308    #[doc = "Airspeed setpoint"]
15309    pub airspeed_sp: u8,
15310    #[doc = "Groundspeed"]
15311    pub groundspeed: u8,
15312    #[doc = "Windspeed"]
15313    pub windspeed: u8,
15314    #[doc = "Wind heading"]
15315    pub wind_heading: u8,
15316    #[doc = "Maximum error horizontal position since last message"]
15317    pub eph: u8,
15318    #[doc = "Maximum error vertical position since last message"]
15319    pub epv: u8,
15320    #[doc = "Air temperature"]
15321    pub temperature_air: i8,
15322    #[doc = "Maximum climb rate magnitude since last message"]
15323    pub climb_rate: i8,
15324    #[doc = "Battery level (-1 if field not provided)."]
15325    pub battery: i8,
15326    #[doc = "Field for custom payload."]
15327    pub custom0: i8,
15328    #[doc = "Field for custom payload."]
15329    pub custom1: i8,
15330    #[doc = "Field for custom payload."]
15331    pub custom2: i8,
15332}
15333impl HIGH_LATENCY2_DATA {
15334    pub const ENCODED_LEN: usize = 42usize;
15335    pub const DEFAULT: Self = Self {
15336        timestamp: 0_u32,
15337        latitude: 0_i32,
15338        longitude: 0_i32,
15339        custom_mode: 0_u16,
15340        altitude: 0_i16,
15341        target_altitude: 0_i16,
15342        target_distance: 0_u16,
15343        wp_num: 0_u16,
15344        failure_flags: HlFailureFlag::DEFAULT,
15345        mavtype: MavType::DEFAULT,
15346        autopilot: MavAutopilot::DEFAULT,
15347        heading: 0_u8,
15348        target_heading: 0_u8,
15349        throttle: 0_u8,
15350        airspeed: 0_u8,
15351        airspeed_sp: 0_u8,
15352        groundspeed: 0_u8,
15353        windspeed: 0_u8,
15354        wind_heading: 0_u8,
15355        eph: 0_u8,
15356        epv: 0_u8,
15357        temperature_air: 0_i8,
15358        climb_rate: 0_i8,
15359        battery: 0_i8,
15360        custom0: 0_i8,
15361        custom1: 0_i8,
15362        custom2: 0_i8,
15363    };
15364    #[cfg(feature = "arbitrary")]
15365    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15366        use arbitrary::{Arbitrary, Unstructured};
15367        let mut buf = [0u8; 1024];
15368        rng.fill_bytes(&mut buf);
15369        let mut unstructured = Unstructured::new(&buf);
15370        Self::arbitrary(&mut unstructured).unwrap_or_default()
15371    }
15372}
15373impl Default for HIGH_LATENCY2_DATA {
15374    fn default() -> Self {
15375        Self::DEFAULT.clone()
15376    }
15377}
15378impl MessageData for HIGH_LATENCY2_DATA {
15379    type Message = MavMessage;
15380    const ID: u32 = 235u32;
15381    const NAME: &'static str = "HIGH_LATENCY2";
15382    const EXTRA_CRC: u8 = 179u8;
15383    const ENCODED_LEN: usize = 42usize;
15384    fn deser(
15385        _version: MavlinkVersion,
15386        __input: &[u8],
15387    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15388        let avail_len = __input.len();
15389        let mut payload_buf = [0; Self::ENCODED_LEN];
15390        let mut buf = if avail_len < Self::ENCODED_LEN {
15391            payload_buf[0..avail_len].copy_from_slice(__input);
15392            Bytes::new(&payload_buf)
15393        } else {
15394            Bytes::new(__input)
15395        };
15396        let mut __struct = Self::default();
15397        __struct.timestamp = buf.get_u32_le();
15398        __struct.latitude = buf.get_i32_le();
15399        __struct.longitude = buf.get_i32_le();
15400        __struct.custom_mode = buf.get_u16_le();
15401        __struct.altitude = buf.get_i16_le();
15402        __struct.target_altitude = buf.get_i16_le();
15403        __struct.target_distance = buf.get_u16_le();
15404        __struct.wp_num = buf.get_u16_le();
15405        let tmp = buf.get_u16_le();
15406        __struct.failure_flags = HlFailureFlag::from_bits(tmp & HlFailureFlag::all().bits())
15407            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15408                flag_type: "HlFailureFlag",
15409                value: tmp as u32,
15410            })?;
15411        let tmp = buf.get_u8();
15412        __struct.mavtype =
15413            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15414                enum_type: "MavType",
15415                value: tmp as u32,
15416            })?;
15417        let tmp = buf.get_u8();
15418        __struct.autopilot =
15419            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15420                enum_type: "MavAutopilot",
15421                value: tmp as u32,
15422            })?;
15423        __struct.heading = buf.get_u8();
15424        __struct.target_heading = buf.get_u8();
15425        __struct.throttle = buf.get_u8();
15426        __struct.airspeed = buf.get_u8();
15427        __struct.airspeed_sp = buf.get_u8();
15428        __struct.groundspeed = buf.get_u8();
15429        __struct.windspeed = buf.get_u8();
15430        __struct.wind_heading = buf.get_u8();
15431        __struct.eph = buf.get_u8();
15432        __struct.epv = buf.get_u8();
15433        __struct.temperature_air = buf.get_i8();
15434        __struct.climb_rate = buf.get_i8();
15435        __struct.battery = buf.get_i8();
15436        __struct.custom0 = buf.get_i8();
15437        __struct.custom1 = buf.get_i8();
15438        __struct.custom2 = buf.get_i8();
15439        Ok(__struct)
15440    }
15441    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15442        let mut __tmp = BytesMut::new(bytes);
15443        #[allow(clippy::absurd_extreme_comparisons)]
15444        #[allow(unused_comparisons)]
15445        if __tmp.remaining() < Self::ENCODED_LEN {
15446            panic!(
15447                "buffer is too small (need {} bytes, but got {})",
15448                Self::ENCODED_LEN,
15449                __tmp.remaining(),
15450            )
15451        }
15452        __tmp.put_u32_le(self.timestamp);
15453        __tmp.put_i32_le(self.latitude);
15454        __tmp.put_i32_le(self.longitude);
15455        __tmp.put_u16_le(self.custom_mode);
15456        __tmp.put_i16_le(self.altitude);
15457        __tmp.put_i16_le(self.target_altitude);
15458        __tmp.put_u16_le(self.target_distance);
15459        __tmp.put_u16_le(self.wp_num);
15460        __tmp.put_u16_le(self.failure_flags.bits());
15461        __tmp.put_u8(self.mavtype as u8);
15462        __tmp.put_u8(self.autopilot as u8);
15463        __tmp.put_u8(self.heading);
15464        __tmp.put_u8(self.target_heading);
15465        __tmp.put_u8(self.throttle);
15466        __tmp.put_u8(self.airspeed);
15467        __tmp.put_u8(self.airspeed_sp);
15468        __tmp.put_u8(self.groundspeed);
15469        __tmp.put_u8(self.windspeed);
15470        __tmp.put_u8(self.wind_heading);
15471        __tmp.put_u8(self.eph);
15472        __tmp.put_u8(self.epv);
15473        __tmp.put_i8(self.temperature_air);
15474        __tmp.put_i8(self.climb_rate);
15475        __tmp.put_i8(self.battery);
15476        __tmp.put_i8(self.custom0);
15477        __tmp.put_i8(self.custom1);
15478        __tmp.put_i8(self.custom2);
15479        if matches!(version, MavlinkVersion::V2) {
15480            let len = __tmp.len();
15481            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15482        } else {
15483            __tmp.len()
15484        }
15485    }
15486}
15487#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
15488#[doc = ""]
15489#[doc = "ID: 93"]
15490#[derive(Debug, Clone, PartialEq)]
15491#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15492#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15493#[cfg_attr(feature = "ts", derive(TS))]
15494#[cfg_attr(feature = "ts", ts(export))]
15495pub struct HIL_ACTUATOR_CONTROLS_DATA {
15496    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15497    pub time_usec: u64,
15498    #[doc = "Flags bitmask."]
15499    pub flags: HilActuatorControlsFlags,
15500    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
15501    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15502    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15503    pub controls: [f32; 16],
15504    #[doc = "System mode. Includes arming state."]
15505    pub mode: MavModeFlag,
15506}
15507impl HIL_ACTUATOR_CONTROLS_DATA {
15508    pub const ENCODED_LEN: usize = 81usize;
15509    pub const DEFAULT: Self = Self {
15510        time_usec: 0_u64,
15511        flags: HilActuatorControlsFlags::DEFAULT,
15512        controls: [0.0_f32; 16usize],
15513        mode: MavModeFlag::DEFAULT,
15514    };
15515    #[cfg(feature = "arbitrary")]
15516    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15517        use arbitrary::{Arbitrary, Unstructured};
15518        let mut buf = [0u8; 1024];
15519        rng.fill_bytes(&mut buf);
15520        let mut unstructured = Unstructured::new(&buf);
15521        Self::arbitrary(&mut unstructured).unwrap_or_default()
15522    }
15523}
15524impl Default for HIL_ACTUATOR_CONTROLS_DATA {
15525    fn default() -> Self {
15526        Self::DEFAULT.clone()
15527    }
15528}
15529impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
15530    type Message = MavMessage;
15531    const ID: u32 = 93u32;
15532    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
15533    const EXTRA_CRC: u8 = 47u8;
15534    const ENCODED_LEN: usize = 81usize;
15535    fn deser(
15536        _version: MavlinkVersion,
15537        __input: &[u8],
15538    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15539        let avail_len = __input.len();
15540        let mut payload_buf = [0; Self::ENCODED_LEN];
15541        let mut buf = if avail_len < Self::ENCODED_LEN {
15542            payload_buf[0..avail_len].copy_from_slice(__input);
15543            Bytes::new(&payload_buf)
15544        } else {
15545            Bytes::new(__input)
15546        };
15547        let mut __struct = Self::default();
15548        __struct.time_usec = buf.get_u64_le();
15549        let tmp = buf.get_u64_le();
15550        __struct.flags =
15551            HilActuatorControlsFlags::from_bits(tmp & HilActuatorControlsFlags::all().bits())
15552                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15553                    flag_type: "HilActuatorControlsFlags",
15554                    value: tmp as u32,
15555                })?;
15556        for v in &mut __struct.controls {
15557            let val = buf.get_f32_le();
15558            *v = val;
15559        }
15560        let tmp = buf.get_u8();
15561        __struct.mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15562            ::mavlink_core::error::ParserError::InvalidFlag {
15563                flag_type: "MavModeFlag",
15564                value: tmp as u32,
15565            },
15566        )?;
15567        Ok(__struct)
15568    }
15569    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15570        let mut __tmp = BytesMut::new(bytes);
15571        #[allow(clippy::absurd_extreme_comparisons)]
15572        #[allow(unused_comparisons)]
15573        if __tmp.remaining() < Self::ENCODED_LEN {
15574            panic!(
15575                "buffer is too small (need {} bytes, but got {})",
15576                Self::ENCODED_LEN,
15577                __tmp.remaining(),
15578            )
15579        }
15580        __tmp.put_u64_le(self.time_usec);
15581        __tmp.put_u64_le(self.flags.bits());
15582        for val in &self.controls {
15583            __tmp.put_f32_le(*val);
15584        }
15585        __tmp.put_u8(self.mode.bits());
15586        if matches!(version, MavlinkVersion::V2) {
15587            let len = __tmp.len();
15588            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15589        } else {
15590            __tmp.len()
15591        }
15592    }
15593}
15594#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
15595#[doc = ""]
15596#[doc = "ID: 91"]
15597#[derive(Debug, Clone, PartialEq)]
15598#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15599#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15600#[cfg_attr(feature = "ts", derive(TS))]
15601#[cfg_attr(feature = "ts", ts(export))]
15602pub struct HIL_CONTROLS_DATA {
15603    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15604    pub time_usec: u64,
15605    #[doc = "Control output -1 .. 1"]
15606    pub roll_ailerons: f32,
15607    #[doc = "Control output -1 .. 1"]
15608    pub pitch_elevator: f32,
15609    #[doc = "Control output -1 .. 1"]
15610    pub yaw_rudder: f32,
15611    #[doc = "Throttle 0 .. 1"]
15612    pub throttle: f32,
15613    #[doc = "Aux 1, -1 .. 1"]
15614    pub aux1: f32,
15615    #[doc = "Aux 2, -1 .. 1"]
15616    pub aux2: f32,
15617    #[doc = "Aux 3, -1 .. 1"]
15618    pub aux3: f32,
15619    #[doc = "Aux 4, -1 .. 1"]
15620    pub aux4: f32,
15621    #[doc = "System mode."]
15622    pub mode: MavMode,
15623    #[doc = "Navigation mode (MAV_NAV_MODE)"]
15624    pub nav_mode: u8,
15625}
15626impl HIL_CONTROLS_DATA {
15627    pub const ENCODED_LEN: usize = 42usize;
15628    pub const DEFAULT: Self = Self {
15629        time_usec: 0_u64,
15630        roll_ailerons: 0.0_f32,
15631        pitch_elevator: 0.0_f32,
15632        yaw_rudder: 0.0_f32,
15633        throttle: 0.0_f32,
15634        aux1: 0.0_f32,
15635        aux2: 0.0_f32,
15636        aux3: 0.0_f32,
15637        aux4: 0.0_f32,
15638        mode: MavMode::DEFAULT,
15639        nav_mode: 0_u8,
15640    };
15641    #[cfg(feature = "arbitrary")]
15642    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15643        use arbitrary::{Arbitrary, Unstructured};
15644        let mut buf = [0u8; 1024];
15645        rng.fill_bytes(&mut buf);
15646        let mut unstructured = Unstructured::new(&buf);
15647        Self::arbitrary(&mut unstructured).unwrap_or_default()
15648    }
15649}
15650impl Default for HIL_CONTROLS_DATA {
15651    fn default() -> Self {
15652        Self::DEFAULT.clone()
15653    }
15654}
15655impl MessageData for HIL_CONTROLS_DATA {
15656    type Message = MavMessage;
15657    const ID: u32 = 91u32;
15658    const NAME: &'static str = "HIL_CONTROLS";
15659    const EXTRA_CRC: u8 = 63u8;
15660    const ENCODED_LEN: usize = 42usize;
15661    fn deser(
15662        _version: MavlinkVersion,
15663        __input: &[u8],
15664    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15665        let avail_len = __input.len();
15666        let mut payload_buf = [0; Self::ENCODED_LEN];
15667        let mut buf = if avail_len < Self::ENCODED_LEN {
15668            payload_buf[0..avail_len].copy_from_slice(__input);
15669            Bytes::new(&payload_buf)
15670        } else {
15671            Bytes::new(__input)
15672        };
15673        let mut __struct = Self::default();
15674        __struct.time_usec = buf.get_u64_le();
15675        __struct.roll_ailerons = buf.get_f32_le();
15676        __struct.pitch_elevator = buf.get_f32_le();
15677        __struct.yaw_rudder = buf.get_f32_le();
15678        __struct.throttle = buf.get_f32_le();
15679        __struct.aux1 = buf.get_f32_le();
15680        __struct.aux2 = buf.get_f32_le();
15681        __struct.aux3 = buf.get_f32_le();
15682        __struct.aux4 = buf.get_f32_le();
15683        let tmp = buf.get_u8();
15684        __struct.mode =
15685            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15686                enum_type: "MavMode",
15687                value: tmp as u32,
15688            })?;
15689        __struct.nav_mode = buf.get_u8();
15690        Ok(__struct)
15691    }
15692    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15693        let mut __tmp = BytesMut::new(bytes);
15694        #[allow(clippy::absurd_extreme_comparisons)]
15695        #[allow(unused_comparisons)]
15696        if __tmp.remaining() < Self::ENCODED_LEN {
15697            panic!(
15698                "buffer is too small (need {} bytes, but got {})",
15699                Self::ENCODED_LEN,
15700                __tmp.remaining(),
15701            )
15702        }
15703        __tmp.put_u64_le(self.time_usec);
15704        __tmp.put_f32_le(self.roll_ailerons);
15705        __tmp.put_f32_le(self.pitch_elevator);
15706        __tmp.put_f32_le(self.yaw_rudder);
15707        __tmp.put_f32_le(self.throttle);
15708        __tmp.put_f32_le(self.aux1);
15709        __tmp.put_f32_le(self.aux2);
15710        __tmp.put_f32_le(self.aux3);
15711        __tmp.put_f32_le(self.aux4);
15712        __tmp.put_u8(self.mode as u8);
15713        __tmp.put_u8(self.nav_mode);
15714        if matches!(version, MavlinkVersion::V2) {
15715            let len = __tmp.len();
15716            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15717        } else {
15718            __tmp.len()
15719        }
15720    }
15721}
15722#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
15723#[doc = ""]
15724#[doc = "ID: 113"]
15725#[derive(Debug, Clone, PartialEq)]
15726#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15727#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15728#[cfg_attr(feature = "ts", derive(TS))]
15729#[cfg_attr(feature = "ts", ts(export))]
15730pub struct HIL_GPS_DATA {
15731    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15732    pub time_usec: u64,
15733    #[doc = "Latitude (WGS84)"]
15734    pub lat: i32,
15735    #[doc = "Longitude (WGS84)"]
15736    pub lon: i32,
15737    #[doc = "Altitude (MSL). Positive for up."]
15738    pub alt: i32,
15739    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15740    pub eph: u16,
15741    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15742    pub epv: u16,
15743    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
15744    pub vel: u16,
15745    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
15746    pub vn: i16,
15747    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
15748    pub ve: i16,
15749    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
15750    pub vd: i16,
15751    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15752    pub cog: u16,
15753    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
15754    pub fix_type: u8,
15755    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15756    pub satellites_visible: u8,
15757    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
15758    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15759    pub id: u8,
15760    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
15761    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15762    pub yaw: u16,
15763}
15764impl HIL_GPS_DATA {
15765    pub const ENCODED_LEN: usize = 39usize;
15766    pub const DEFAULT: Self = Self {
15767        time_usec: 0_u64,
15768        lat: 0_i32,
15769        lon: 0_i32,
15770        alt: 0_i32,
15771        eph: 0_u16,
15772        epv: 0_u16,
15773        vel: 0_u16,
15774        vn: 0_i16,
15775        ve: 0_i16,
15776        vd: 0_i16,
15777        cog: 0_u16,
15778        fix_type: 0_u8,
15779        satellites_visible: 0_u8,
15780        id: 0_u8,
15781        yaw: 0_u16,
15782    };
15783    #[cfg(feature = "arbitrary")]
15784    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15785        use arbitrary::{Arbitrary, Unstructured};
15786        let mut buf = [0u8; 1024];
15787        rng.fill_bytes(&mut buf);
15788        let mut unstructured = Unstructured::new(&buf);
15789        Self::arbitrary(&mut unstructured).unwrap_or_default()
15790    }
15791}
15792impl Default for HIL_GPS_DATA {
15793    fn default() -> Self {
15794        Self::DEFAULT.clone()
15795    }
15796}
15797impl MessageData for HIL_GPS_DATA {
15798    type Message = MavMessage;
15799    const ID: u32 = 113u32;
15800    const NAME: &'static str = "HIL_GPS";
15801    const EXTRA_CRC: u8 = 124u8;
15802    const ENCODED_LEN: usize = 39usize;
15803    fn deser(
15804        _version: MavlinkVersion,
15805        __input: &[u8],
15806    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15807        let avail_len = __input.len();
15808        let mut payload_buf = [0; Self::ENCODED_LEN];
15809        let mut buf = if avail_len < Self::ENCODED_LEN {
15810            payload_buf[0..avail_len].copy_from_slice(__input);
15811            Bytes::new(&payload_buf)
15812        } else {
15813            Bytes::new(__input)
15814        };
15815        let mut __struct = Self::default();
15816        __struct.time_usec = buf.get_u64_le();
15817        __struct.lat = buf.get_i32_le();
15818        __struct.lon = buf.get_i32_le();
15819        __struct.alt = buf.get_i32_le();
15820        __struct.eph = buf.get_u16_le();
15821        __struct.epv = buf.get_u16_le();
15822        __struct.vel = buf.get_u16_le();
15823        __struct.vn = buf.get_i16_le();
15824        __struct.ve = buf.get_i16_le();
15825        __struct.vd = buf.get_i16_le();
15826        __struct.cog = buf.get_u16_le();
15827        __struct.fix_type = buf.get_u8();
15828        __struct.satellites_visible = buf.get_u8();
15829        __struct.id = buf.get_u8();
15830        __struct.yaw = buf.get_u16_le();
15831        Ok(__struct)
15832    }
15833    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15834        let mut __tmp = BytesMut::new(bytes);
15835        #[allow(clippy::absurd_extreme_comparisons)]
15836        #[allow(unused_comparisons)]
15837        if __tmp.remaining() < Self::ENCODED_LEN {
15838            panic!(
15839                "buffer is too small (need {} bytes, but got {})",
15840                Self::ENCODED_LEN,
15841                __tmp.remaining(),
15842            )
15843        }
15844        __tmp.put_u64_le(self.time_usec);
15845        __tmp.put_i32_le(self.lat);
15846        __tmp.put_i32_le(self.lon);
15847        __tmp.put_i32_le(self.alt);
15848        __tmp.put_u16_le(self.eph);
15849        __tmp.put_u16_le(self.epv);
15850        __tmp.put_u16_le(self.vel);
15851        __tmp.put_i16_le(self.vn);
15852        __tmp.put_i16_le(self.ve);
15853        __tmp.put_i16_le(self.vd);
15854        __tmp.put_u16_le(self.cog);
15855        __tmp.put_u8(self.fix_type);
15856        __tmp.put_u8(self.satellites_visible);
15857        if matches!(version, MavlinkVersion::V2) {
15858            __tmp.put_u8(self.id);
15859            __tmp.put_u16_le(self.yaw);
15860            let len = __tmp.len();
15861            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15862        } else {
15863            __tmp.len()
15864        }
15865    }
15866}
15867#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
15868#[doc = ""]
15869#[doc = "ID: 114"]
15870#[derive(Debug, Clone, PartialEq)]
15871#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15872#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15873#[cfg_attr(feature = "ts", derive(TS))]
15874#[cfg_attr(feature = "ts", ts(export))]
15875pub struct HIL_OPTICAL_FLOW_DATA {
15876    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15877    pub time_usec: u64,
15878    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
15879    pub integration_time_us: u32,
15880    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
15881    pub integrated_x: f32,
15882    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
15883    pub integrated_y: f32,
15884    #[doc = "RH rotation around X axis"]
15885    pub integrated_xgyro: f32,
15886    #[doc = "RH rotation around Y axis"]
15887    pub integrated_ygyro: f32,
15888    #[doc = "RH rotation around Z axis"]
15889    pub integrated_zgyro: f32,
15890    #[doc = "Time since the distance was sampled."]
15891    pub time_delta_distance_us: u32,
15892    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
15893    pub distance: f32,
15894    #[doc = "Temperature"]
15895    pub temperature: i16,
15896    #[doc = "Sensor ID"]
15897    pub sensor_id: u8,
15898    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
15899    pub quality: u8,
15900}
15901impl HIL_OPTICAL_FLOW_DATA {
15902    pub const ENCODED_LEN: usize = 44usize;
15903    pub const DEFAULT: Self = Self {
15904        time_usec: 0_u64,
15905        integration_time_us: 0_u32,
15906        integrated_x: 0.0_f32,
15907        integrated_y: 0.0_f32,
15908        integrated_xgyro: 0.0_f32,
15909        integrated_ygyro: 0.0_f32,
15910        integrated_zgyro: 0.0_f32,
15911        time_delta_distance_us: 0_u32,
15912        distance: 0.0_f32,
15913        temperature: 0_i16,
15914        sensor_id: 0_u8,
15915        quality: 0_u8,
15916    };
15917    #[cfg(feature = "arbitrary")]
15918    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15919        use arbitrary::{Arbitrary, Unstructured};
15920        let mut buf = [0u8; 1024];
15921        rng.fill_bytes(&mut buf);
15922        let mut unstructured = Unstructured::new(&buf);
15923        Self::arbitrary(&mut unstructured).unwrap_or_default()
15924    }
15925}
15926impl Default for HIL_OPTICAL_FLOW_DATA {
15927    fn default() -> Self {
15928        Self::DEFAULT.clone()
15929    }
15930}
15931impl MessageData for HIL_OPTICAL_FLOW_DATA {
15932    type Message = MavMessage;
15933    const ID: u32 = 114u32;
15934    const NAME: &'static str = "HIL_OPTICAL_FLOW";
15935    const EXTRA_CRC: u8 = 237u8;
15936    const ENCODED_LEN: usize = 44usize;
15937    fn deser(
15938        _version: MavlinkVersion,
15939        __input: &[u8],
15940    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15941        let avail_len = __input.len();
15942        let mut payload_buf = [0; Self::ENCODED_LEN];
15943        let mut buf = if avail_len < Self::ENCODED_LEN {
15944            payload_buf[0..avail_len].copy_from_slice(__input);
15945            Bytes::new(&payload_buf)
15946        } else {
15947            Bytes::new(__input)
15948        };
15949        let mut __struct = Self::default();
15950        __struct.time_usec = buf.get_u64_le();
15951        __struct.integration_time_us = buf.get_u32_le();
15952        __struct.integrated_x = buf.get_f32_le();
15953        __struct.integrated_y = buf.get_f32_le();
15954        __struct.integrated_xgyro = buf.get_f32_le();
15955        __struct.integrated_ygyro = buf.get_f32_le();
15956        __struct.integrated_zgyro = buf.get_f32_le();
15957        __struct.time_delta_distance_us = buf.get_u32_le();
15958        __struct.distance = buf.get_f32_le();
15959        __struct.temperature = buf.get_i16_le();
15960        __struct.sensor_id = buf.get_u8();
15961        __struct.quality = buf.get_u8();
15962        Ok(__struct)
15963    }
15964    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15965        let mut __tmp = BytesMut::new(bytes);
15966        #[allow(clippy::absurd_extreme_comparisons)]
15967        #[allow(unused_comparisons)]
15968        if __tmp.remaining() < Self::ENCODED_LEN {
15969            panic!(
15970                "buffer is too small (need {} bytes, but got {})",
15971                Self::ENCODED_LEN,
15972                __tmp.remaining(),
15973            )
15974        }
15975        __tmp.put_u64_le(self.time_usec);
15976        __tmp.put_u32_le(self.integration_time_us);
15977        __tmp.put_f32_le(self.integrated_x);
15978        __tmp.put_f32_le(self.integrated_y);
15979        __tmp.put_f32_le(self.integrated_xgyro);
15980        __tmp.put_f32_le(self.integrated_ygyro);
15981        __tmp.put_f32_le(self.integrated_zgyro);
15982        __tmp.put_u32_le(self.time_delta_distance_us);
15983        __tmp.put_f32_le(self.distance);
15984        __tmp.put_i16_le(self.temperature);
15985        __tmp.put_u8(self.sensor_id);
15986        __tmp.put_u8(self.quality);
15987        if matches!(version, MavlinkVersion::V2) {
15988            let len = __tmp.len();
15989            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15990        } else {
15991            __tmp.len()
15992        }
15993    }
15994}
15995#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
15996#[doc = ""]
15997#[doc = "ID: 92"]
15998#[derive(Debug, Clone, PartialEq)]
15999#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16000#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16001#[cfg_attr(feature = "ts", derive(TS))]
16002#[cfg_attr(feature = "ts", ts(export))]
16003pub struct HIL_RC_INPUTS_RAW_DATA {
16004    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16005    pub time_usec: u64,
16006    #[doc = "RC channel 1 value"]
16007    pub chan1_raw: u16,
16008    #[doc = "RC channel 2 value"]
16009    pub chan2_raw: u16,
16010    #[doc = "RC channel 3 value"]
16011    pub chan3_raw: u16,
16012    #[doc = "RC channel 4 value"]
16013    pub chan4_raw: u16,
16014    #[doc = "RC channel 5 value"]
16015    pub chan5_raw: u16,
16016    #[doc = "RC channel 6 value"]
16017    pub chan6_raw: u16,
16018    #[doc = "RC channel 7 value"]
16019    pub chan7_raw: u16,
16020    #[doc = "RC channel 8 value"]
16021    pub chan8_raw: u16,
16022    #[doc = "RC channel 9 value"]
16023    pub chan9_raw: u16,
16024    #[doc = "RC channel 10 value"]
16025    pub chan10_raw: u16,
16026    #[doc = "RC channel 11 value"]
16027    pub chan11_raw: u16,
16028    #[doc = "RC channel 12 value"]
16029    pub chan12_raw: u16,
16030    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16031    pub rssi: u8,
16032}
16033impl HIL_RC_INPUTS_RAW_DATA {
16034    pub const ENCODED_LEN: usize = 33usize;
16035    pub const DEFAULT: Self = Self {
16036        time_usec: 0_u64,
16037        chan1_raw: 0_u16,
16038        chan2_raw: 0_u16,
16039        chan3_raw: 0_u16,
16040        chan4_raw: 0_u16,
16041        chan5_raw: 0_u16,
16042        chan6_raw: 0_u16,
16043        chan7_raw: 0_u16,
16044        chan8_raw: 0_u16,
16045        chan9_raw: 0_u16,
16046        chan10_raw: 0_u16,
16047        chan11_raw: 0_u16,
16048        chan12_raw: 0_u16,
16049        rssi: 0_u8,
16050    };
16051    #[cfg(feature = "arbitrary")]
16052    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16053        use arbitrary::{Arbitrary, Unstructured};
16054        let mut buf = [0u8; 1024];
16055        rng.fill_bytes(&mut buf);
16056        let mut unstructured = Unstructured::new(&buf);
16057        Self::arbitrary(&mut unstructured).unwrap_or_default()
16058    }
16059}
16060impl Default for HIL_RC_INPUTS_RAW_DATA {
16061    fn default() -> Self {
16062        Self::DEFAULT.clone()
16063    }
16064}
16065impl MessageData for HIL_RC_INPUTS_RAW_DATA {
16066    type Message = MavMessage;
16067    const ID: u32 = 92u32;
16068    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
16069    const EXTRA_CRC: u8 = 54u8;
16070    const ENCODED_LEN: usize = 33usize;
16071    fn deser(
16072        _version: MavlinkVersion,
16073        __input: &[u8],
16074    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16075        let avail_len = __input.len();
16076        let mut payload_buf = [0; Self::ENCODED_LEN];
16077        let mut buf = if avail_len < Self::ENCODED_LEN {
16078            payload_buf[0..avail_len].copy_from_slice(__input);
16079            Bytes::new(&payload_buf)
16080        } else {
16081            Bytes::new(__input)
16082        };
16083        let mut __struct = Self::default();
16084        __struct.time_usec = buf.get_u64_le();
16085        __struct.chan1_raw = buf.get_u16_le();
16086        __struct.chan2_raw = buf.get_u16_le();
16087        __struct.chan3_raw = buf.get_u16_le();
16088        __struct.chan4_raw = buf.get_u16_le();
16089        __struct.chan5_raw = buf.get_u16_le();
16090        __struct.chan6_raw = buf.get_u16_le();
16091        __struct.chan7_raw = buf.get_u16_le();
16092        __struct.chan8_raw = buf.get_u16_le();
16093        __struct.chan9_raw = buf.get_u16_le();
16094        __struct.chan10_raw = buf.get_u16_le();
16095        __struct.chan11_raw = buf.get_u16_le();
16096        __struct.chan12_raw = buf.get_u16_le();
16097        __struct.rssi = buf.get_u8();
16098        Ok(__struct)
16099    }
16100    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16101        let mut __tmp = BytesMut::new(bytes);
16102        #[allow(clippy::absurd_extreme_comparisons)]
16103        #[allow(unused_comparisons)]
16104        if __tmp.remaining() < Self::ENCODED_LEN {
16105            panic!(
16106                "buffer is too small (need {} bytes, but got {})",
16107                Self::ENCODED_LEN,
16108                __tmp.remaining(),
16109            )
16110        }
16111        __tmp.put_u64_le(self.time_usec);
16112        __tmp.put_u16_le(self.chan1_raw);
16113        __tmp.put_u16_le(self.chan2_raw);
16114        __tmp.put_u16_le(self.chan3_raw);
16115        __tmp.put_u16_le(self.chan4_raw);
16116        __tmp.put_u16_le(self.chan5_raw);
16117        __tmp.put_u16_le(self.chan6_raw);
16118        __tmp.put_u16_le(self.chan7_raw);
16119        __tmp.put_u16_le(self.chan8_raw);
16120        __tmp.put_u16_le(self.chan9_raw);
16121        __tmp.put_u16_le(self.chan10_raw);
16122        __tmp.put_u16_le(self.chan11_raw);
16123        __tmp.put_u16_le(self.chan12_raw);
16124        __tmp.put_u8(self.rssi);
16125        if matches!(version, MavlinkVersion::V2) {
16126            let len = __tmp.len();
16127            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16128        } else {
16129            __tmp.len()
16130        }
16131    }
16132}
16133#[doc = "The IMU readings in SI units in NED body frame."]
16134#[doc = ""]
16135#[doc = "ID: 107"]
16136#[derive(Debug, Clone, PartialEq)]
16137#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16138#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16139#[cfg_attr(feature = "ts", derive(TS))]
16140#[cfg_attr(feature = "ts", ts(export))]
16141pub struct HIL_SENSOR_DATA {
16142    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16143    pub time_usec: u64,
16144    #[doc = "X acceleration"]
16145    pub xacc: f32,
16146    #[doc = "Y acceleration"]
16147    pub yacc: f32,
16148    #[doc = "Z acceleration"]
16149    pub zacc: f32,
16150    #[doc = "Angular speed around X axis in body frame"]
16151    pub xgyro: f32,
16152    #[doc = "Angular speed around Y axis in body frame"]
16153    pub ygyro: f32,
16154    #[doc = "Angular speed around Z axis in body frame"]
16155    pub zgyro: f32,
16156    #[doc = "X Magnetic field"]
16157    pub xmag: f32,
16158    #[doc = "Y Magnetic field"]
16159    pub ymag: f32,
16160    #[doc = "Z Magnetic field"]
16161    pub zmag: f32,
16162    #[doc = "Absolute pressure"]
16163    pub abs_pressure: f32,
16164    #[doc = "Differential pressure (airspeed)"]
16165    pub diff_pressure: f32,
16166    #[doc = "Altitude calculated from pressure"]
16167    pub pressure_alt: f32,
16168    #[doc = "Temperature"]
16169    pub temperature: f32,
16170    #[doc = "Bitmap for fields that have updated since last message"]
16171    pub fields_updated: HilSensorUpdatedFlags,
16172    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
16173    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16174    pub id: u8,
16175}
16176impl HIL_SENSOR_DATA {
16177    pub const ENCODED_LEN: usize = 65usize;
16178    pub const DEFAULT: Self = Self {
16179        time_usec: 0_u64,
16180        xacc: 0.0_f32,
16181        yacc: 0.0_f32,
16182        zacc: 0.0_f32,
16183        xgyro: 0.0_f32,
16184        ygyro: 0.0_f32,
16185        zgyro: 0.0_f32,
16186        xmag: 0.0_f32,
16187        ymag: 0.0_f32,
16188        zmag: 0.0_f32,
16189        abs_pressure: 0.0_f32,
16190        diff_pressure: 0.0_f32,
16191        pressure_alt: 0.0_f32,
16192        temperature: 0.0_f32,
16193        fields_updated: HilSensorUpdatedFlags::DEFAULT,
16194        id: 0_u8,
16195    };
16196    #[cfg(feature = "arbitrary")]
16197    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16198        use arbitrary::{Arbitrary, Unstructured};
16199        let mut buf = [0u8; 1024];
16200        rng.fill_bytes(&mut buf);
16201        let mut unstructured = Unstructured::new(&buf);
16202        Self::arbitrary(&mut unstructured).unwrap_or_default()
16203    }
16204}
16205impl Default for HIL_SENSOR_DATA {
16206    fn default() -> Self {
16207        Self::DEFAULT.clone()
16208    }
16209}
16210impl MessageData for HIL_SENSOR_DATA {
16211    type Message = MavMessage;
16212    const ID: u32 = 107u32;
16213    const NAME: &'static str = "HIL_SENSOR";
16214    const EXTRA_CRC: u8 = 108u8;
16215    const ENCODED_LEN: usize = 65usize;
16216    fn deser(
16217        _version: MavlinkVersion,
16218        __input: &[u8],
16219    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16220        let avail_len = __input.len();
16221        let mut payload_buf = [0; Self::ENCODED_LEN];
16222        let mut buf = if avail_len < Self::ENCODED_LEN {
16223            payload_buf[0..avail_len].copy_from_slice(__input);
16224            Bytes::new(&payload_buf)
16225        } else {
16226            Bytes::new(__input)
16227        };
16228        let mut __struct = Self::default();
16229        __struct.time_usec = buf.get_u64_le();
16230        __struct.xacc = buf.get_f32_le();
16231        __struct.yacc = buf.get_f32_le();
16232        __struct.zacc = buf.get_f32_le();
16233        __struct.xgyro = buf.get_f32_le();
16234        __struct.ygyro = buf.get_f32_le();
16235        __struct.zgyro = buf.get_f32_le();
16236        __struct.xmag = buf.get_f32_le();
16237        __struct.ymag = buf.get_f32_le();
16238        __struct.zmag = buf.get_f32_le();
16239        __struct.abs_pressure = buf.get_f32_le();
16240        __struct.diff_pressure = buf.get_f32_le();
16241        __struct.pressure_alt = buf.get_f32_le();
16242        __struct.temperature = buf.get_f32_le();
16243        let tmp = buf.get_u32_le();
16244        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
16245            tmp & HilSensorUpdatedFlags::all().bits(),
16246        )
16247        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16248            flag_type: "HilSensorUpdatedFlags",
16249            value: tmp as u32,
16250        })?;
16251        __struct.id = buf.get_u8();
16252        Ok(__struct)
16253    }
16254    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16255        let mut __tmp = BytesMut::new(bytes);
16256        #[allow(clippy::absurd_extreme_comparisons)]
16257        #[allow(unused_comparisons)]
16258        if __tmp.remaining() < Self::ENCODED_LEN {
16259            panic!(
16260                "buffer is too small (need {} bytes, but got {})",
16261                Self::ENCODED_LEN,
16262                __tmp.remaining(),
16263            )
16264        }
16265        __tmp.put_u64_le(self.time_usec);
16266        __tmp.put_f32_le(self.xacc);
16267        __tmp.put_f32_le(self.yacc);
16268        __tmp.put_f32_le(self.zacc);
16269        __tmp.put_f32_le(self.xgyro);
16270        __tmp.put_f32_le(self.ygyro);
16271        __tmp.put_f32_le(self.zgyro);
16272        __tmp.put_f32_le(self.xmag);
16273        __tmp.put_f32_le(self.ymag);
16274        __tmp.put_f32_le(self.zmag);
16275        __tmp.put_f32_le(self.abs_pressure);
16276        __tmp.put_f32_le(self.diff_pressure);
16277        __tmp.put_f32_le(self.pressure_alt);
16278        __tmp.put_f32_le(self.temperature);
16279        __tmp.put_u32_le(self.fields_updated.bits());
16280        if matches!(version, MavlinkVersion::V2) {
16281            __tmp.put_u8(self.id);
16282            let len = __tmp.len();
16283            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16284        } else {
16285            __tmp.len()
16286        }
16287    }
16288}
16289#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
16290#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16291#[doc = ""]
16292#[doc = "ID: 90"]
16293#[derive(Debug, Clone, PartialEq)]
16294#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16295#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16296#[cfg_attr(feature = "ts", derive(TS))]
16297#[cfg_attr(feature = "ts", ts(export))]
16298pub struct HIL_STATE_DATA {
16299    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16300    pub time_usec: u64,
16301    #[doc = "Roll angle"]
16302    pub roll: f32,
16303    #[doc = "Pitch angle"]
16304    pub pitch: f32,
16305    #[doc = "Yaw angle"]
16306    pub yaw: f32,
16307    #[doc = "Body frame roll / phi angular speed"]
16308    pub rollspeed: f32,
16309    #[doc = "Body frame pitch / theta angular speed"]
16310    pub pitchspeed: f32,
16311    #[doc = "Body frame yaw / psi angular speed"]
16312    pub yawspeed: f32,
16313    #[doc = "Latitude"]
16314    pub lat: i32,
16315    #[doc = "Longitude"]
16316    pub lon: i32,
16317    #[doc = "Altitude"]
16318    pub alt: i32,
16319    #[doc = "Ground X Speed (Latitude)"]
16320    pub vx: i16,
16321    #[doc = "Ground Y Speed (Longitude)"]
16322    pub vy: i16,
16323    #[doc = "Ground Z Speed (Altitude)"]
16324    pub vz: i16,
16325    #[doc = "X acceleration"]
16326    pub xacc: i16,
16327    #[doc = "Y acceleration"]
16328    pub yacc: i16,
16329    #[doc = "Z acceleration"]
16330    pub zacc: i16,
16331}
16332impl HIL_STATE_DATA {
16333    pub const ENCODED_LEN: usize = 56usize;
16334    pub const DEFAULT: Self = Self {
16335        time_usec: 0_u64,
16336        roll: 0.0_f32,
16337        pitch: 0.0_f32,
16338        yaw: 0.0_f32,
16339        rollspeed: 0.0_f32,
16340        pitchspeed: 0.0_f32,
16341        yawspeed: 0.0_f32,
16342        lat: 0_i32,
16343        lon: 0_i32,
16344        alt: 0_i32,
16345        vx: 0_i16,
16346        vy: 0_i16,
16347        vz: 0_i16,
16348        xacc: 0_i16,
16349        yacc: 0_i16,
16350        zacc: 0_i16,
16351    };
16352    #[cfg(feature = "arbitrary")]
16353    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16354        use arbitrary::{Arbitrary, Unstructured};
16355        let mut buf = [0u8; 1024];
16356        rng.fill_bytes(&mut buf);
16357        let mut unstructured = Unstructured::new(&buf);
16358        Self::arbitrary(&mut unstructured).unwrap_or_default()
16359    }
16360}
16361impl Default for HIL_STATE_DATA {
16362    fn default() -> Self {
16363        Self::DEFAULT.clone()
16364    }
16365}
16366impl MessageData for HIL_STATE_DATA {
16367    type Message = MavMessage;
16368    const ID: u32 = 90u32;
16369    const NAME: &'static str = "HIL_STATE";
16370    const EXTRA_CRC: u8 = 183u8;
16371    const ENCODED_LEN: usize = 56usize;
16372    fn deser(
16373        _version: MavlinkVersion,
16374        __input: &[u8],
16375    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16376        let avail_len = __input.len();
16377        let mut payload_buf = [0; Self::ENCODED_LEN];
16378        let mut buf = if avail_len < Self::ENCODED_LEN {
16379            payload_buf[0..avail_len].copy_from_slice(__input);
16380            Bytes::new(&payload_buf)
16381        } else {
16382            Bytes::new(__input)
16383        };
16384        let mut __struct = Self::default();
16385        __struct.time_usec = buf.get_u64_le();
16386        __struct.roll = buf.get_f32_le();
16387        __struct.pitch = buf.get_f32_le();
16388        __struct.yaw = buf.get_f32_le();
16389        __struct.rollspeed = buf.get_f32_le();
16390        __struct.pitchspeed = buf.get_f32_le();
16391        __struct.yawspeed = buf.get_f32_le();
16392        __struct.lat = buf.get_i32_le();
16393        __struct.lon = buf.get_i32_le();
16394        __struct.alt = buf.get_i32_le();
16395        __struct.vx = buf.get_i16_le();
16396        __struct.vy = buf.get_i16_le();
16397        __struct.vz = buf.get_i16_le();
16398        __struct.xacc = buf.get_i16_le();
16399        __struct.yacc = buf.get_i16_le();
16400        __struct.zacc = buf.get_i16_le();
16401        Ok(__struct)
16402    }
16403    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16404        let mut __tmp = BytesMut::new(bytes);
16405        #[allow(clippy::absurd_extreme_comparisons)]
16406        #[allow(unused_comparisons)]
16407        if __tmp.remaining() < Self::ENCODED_LEN {
16408            panic!(
16409                "buffer is too small (need {} bytes, but got {})",
16410                Self::ENCODED_LEN,
16411                __tmp.remaining(),
16412            )
16413        }
16414        __tmp.put_u64_le(self.time_usec);
16415        __tmp.put_f32_le(self.roll);
16416        __tmp.put_f32_le(self.pitch);
16417        __tmp.put_f32_le(self.yaw);
16418        __tmp.put_f32_le(self.rollspeed);
16419        __tmp.put_f32_le(self.pitchspeed);
16420        __tmp.put_f32_le(self.yawspeed);
16421        __tmp.put_i32_le(self.lat);
16422        __tmp.put_i32_le(self.lon);
16423        __tmp.put_i32_le(self.alt);
16424        __tmp.put_i16_le(self.vx);
16425        __tmp.put_i16_le(self.vy);
16426        __tmp.put_i16_le(self.vz);
16427        __tmp.put_i16_le(self.xacc);
16428        __tmp.put_i16_le(self.yacc);
16429        __tmp.put_i16_le(self.zacc);
16430        if matches!(version, MavlinkVersion::V2) {
16431            let len = __tmp.len();
16432            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16433        } else {
16434            __tmp.len()
16435        }
16436    }
16437}
16438#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16439#[doc = ""]
16440#[doc = "ID: 115"]
16441#[derive(Debug, Clone, PartialEq)]
16442#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16443#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16444#[cfg_attr(feature = "ts", derive(TS))]
16445#[cfg_attr(feature = "ts", ts(export))]
16446pub struct HIL_STATE_QUATERNION_DATA {
16447    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16448    pub time_usec: u64,
16449    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
16450    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16451    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16452    pub attitude_quaternion: [f32; 4],
16453    #[doc = "Body frame roll / phi angular speed"]
16454    pub rollspeed: f32,
16455    #[doc = "Body frame pitch / theta angular speed"]
16456    pub pitchspeed: f32,
16457    #[doc = "Body frame yaw / psi angular speed"]
16458    pub yawspeed: f32,
16459    #[doc = "Latitude"]
16460    pub lat: i32,
16461    #[doc = "Longitude"]
16462    pub lon: i32,
16463    #[doc = "Altitude"]
16464    pub alt: i32,
16465    #[doc = "Ground X Speed (Latitude)"]
16466    pub vx: i16,
16467    #[doc = "Ground Y Speed (Longitude)"]
16468    pub vy: i16,
16469    #[doc = "Ground Z Speed (Altitude)"]
16470    pub vz: i16,
16471    #[doc = "Indicated airspeed"]
16472    pub ind_airspeed: u16,
16473    #[doc = "True airspeed"]
16474    pub true_airspeed: u16,
16475    #[doc = "X acceleration"]
16476    pub xacc: i16,
16477    #[doc = "Y acceleration"]
16478    pub yacc: i16,
16479    #[doc = "Z acceleration"]
16480    pub zacc: i16,
16481}
16482impl HIL_STATE_QUATERNION_DATA {
16483    pub const ENCODED_LEN: usize = 64usize;
16484    pub const DEFAULT: Self = Self {
16485        time_usec: 0_u64,
16486        attitude_quaternion: [0.0_f32; 4usize],
16487        rollspeed: 0.0_f32,
16488        pitchspeed: 0.0_f32,
16489        yawspeed: 0.0_f32,
16490        lat: 0_i32,
16491        lon: 0_i32,
16492        alt: 0_i32,
16493        vx: 0_i16,
16494        vy: 0_i16,
16495        vz: 0_i16,
16496        ind_airspeed: 0_u16,
16497        true_airspeed: 0_u16,
16498        xacc: 0_i16,
16499        yacc: 0_i16,
16500        zacc: 0_i16,
16501    };
16502    #[cfg(feature = "arbitrary")]
16503    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16504        use arbitrary::{Arbitrary, Unstructured};
16505        let mut buf = [0u8; 1024];
16506        rng.fill_bytes(&mut buf);
16507        let mut unstructured = Unstructured::new(&buf);
16508        Self::arbitrary(&mut unstructured).unwrap_or_default()
16509    }
16510}
16511impl Default for HIL_STATE_QUATERNION_DATA {
16512    fn default() -> Self {
16513        Self::DEFAULT.clone()
16514    }
16515}
16516impl MessageData for HIL_STATE_QUATERNION_DATA {
16517    type Message = MavMessage;
16518    const ID: u32 = 115u32;
16519    const NAME: &'static str = "HIL_STATE_QUATERNION";
16520    const EXTRA_CRC: u8 = 4u8;
16521    const ENCODED_LEN: usize = 64usize;
16522    fn deser(
16523        _version: MavlinkVersion,
16524        __input: &[u8],
16525    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16526        let avail_len = __input.len();
16527        let mut payload_buf = [0; Self::ENCODED_LEN];
16528        let mut buf = if avail_len < Self::ENCODED_LEN {
16529            payload_buf[0..avail_len].copy_from_slice(__input);
16530            Bytes::new(&payload_buf)
16531        } else {
16532            Bytes::new(__input)
16533        };
16534        let mut __struct = Self::default();
16535        __struct.time_usec = buf.get_u64_le();
16536        for v in &mut __struct.attitude_quaternion {
16537            let val = buf.get_f32_le();
16538            *v = val;
16539        }
16540        __struct.rollspeed = buf.get_f32_le();
16541        __struct.pitchspeed = buf.get_f32_le();
16542        __struct.yawspeed = buf.get_f32_le();
16543        __struct.lat = buf.get_i32_le();
16544        __struct.lon = buf.get_i32_le();
16545        __struct.alt = buf.get_i32_le();
16546        __struct.vx = buf.get_i16_le();
16547        __struct.vy = buf.get_i16_le();
16548        __struct.vz = buf.get_i16_le();
16549        __struct.ind_airspeed = buf.get_u16_le();
16550        __struct.true_airspeed = buf.get_u16_le();
16551        __struct.xacc = buf.get_i16_le();
16552        __struct.yacc = buf.get_i16_le();
16553        __struct.zacc = buf.get_i16_le();
16554        Ok(__struct)
16555    }
16556    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16557        let mut __tmp = BytesMut::new(bytes);
16558        #[allow(clippy::absurd_extreme_comparisons)]
16559        #[allow(unused_comparisons)]
16560        if __tmp.remaining() < Self::ENCODED_LEN {
16561            panic!(
16562                "buffer is too small (need {} bytes, but got {})",
16563                Self::ENCODED_LEN,
16564                __tmp.remaining(),
16565            )
16566        }
16567        __tmp.put_u64_le(self.time_usec);
16568        for val in &self.attitude_quaternion {
16569            __tmp.put_f32_le(*val);
16570        }
16571        __tmp.put_f32_le(self.rollspeed);
16572        __tmp.put_f32_le(self.pitchspeed);
16573        __tmp.put_f32_le(self.yawspeed);
16574        __tmp.put_i32_le(self.lat);
16575        __tmp.put_i32_le(self.lon);
16576        __tmp.put_i32_le(self.alt);
16577        __tmp.put_i16_le(self.vx);
16578        __tmp.put_i16_le(self.vy);
16579        __tmp.put_i16_le(self.vz);
16580        __tmp.put_u16_le(self.ind_airspeed);
16581        __tmp.put_u16_le(self.true_airspeed);
16582        __tmp.put_i16_le(self.xacc);
16583        __tmp.put_i16_le(self.yacc);
16584        __tmp.put_i16_le(self.zacc);
16585        if matches!(version, MavlinkVersion::V2) {
16586            let len = __tmp.len();
16587            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16588        } else {
16589            __tmp.len()
16590        }
16591    }
16592}
16593#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
16594#[doc = ""]
16595#[doc = "ID: 242"]
16596#[derive(Debug, Clone, PartialEq)]
16597#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16598#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16599#[cfg_attr(feature = "ts", derive(TS))]
16600#[cfg_attr(feature = "ts", ts(export))]
16601pub struct HOME_POSITION_DATA {
16602    #[doc = "Latitude (WGS84)"]
16603    pub latitude: i32,
16604    #[doc = "Longitude (WGS84)"]
16605    pub longitude: i32,
16606    #[doc = "Altitude (MSL). Positive for up."]
16607    pub altitude: i32,
16608    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
16609    pub x: f32,
16610    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
16611    pub y: f32,
16612    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
16613    pub z: f32,
16614    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
16615    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16616    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16617    pub q: [f32; 4],
16618    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16619    pub approach_x: f32,
16620    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16621    pub approach_y: f32,
16622    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16623    pub approach_z: f32,
16624    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16625    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16626    pub time_usec: u64,
16627}
16628impl HOME_POSITION_DATA {
16629    pub const ENCODED_LEN: usize = 60usize;
16630    pub const DEFAULT: Self = Self {
16631        latitude: 0_i32,
16632        longitude: 0_i32,
16633        altitude: 0_i32,
16634        x: 0.0_f32,
16635        y: 0.0_f32,
16636        z: 0.0_f32,
16637        q: [0.0_f32; 4usize],
16638        approach_x: 0.0_f32,
16639        approach_y: 0.0_f32,
16640        approach_z: 0.0_f32,
16641        time_usec: 0_u64,
16642    };
16643    #[cfg(feature = "arbitrary")]
16644    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16645        use arbitrary::{Arbitrary, Unstructured};
16646        let mut buf = [0u8; 1024];
16647        rng.fill_bytes(&mut buf);
16648        let mut unstructured = Unstructured::new(&buf);
16649        Self::arbitrary(&mut unstructured).unwrap_or_default()
16650    }
16651}
16652impl Default for HOME_POSITION_DATA {
16653    fn default() -> Self {
16654        Self::DEFAULT.clone()
16655    }
16656}
16657impl MessageData for HOME_POSITION_DATA {
16658    type Message = MavMessage;
16659    const ID: u32 = 242u32;
16660    const NAME: &'static str = "HOME_POSITION";
16661    const EXTRA_CRC: u8 = 104u8;
16662    const ENCODED_LEN: usize = 60usize;
16663    fn deser(
16664        _version: MavlinkVersion,
16665        __input: &[u8],
16666    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16667        let avail_len = __input.len();
16668        let mut payload_buf = [0; Self::ENCODED_LEN];
16669        let mut buf = if avail_len < Self::ENCODED_LEN {
16670            payload_buf[0..avail_len].copy_from_slice(__input);
16671            Bytes::new(&payload_buf)
16672        } else {
16673            Bytes::new(__input)
16674        };
16675        let mut __struct = Self::default();
16676        __struct.latitude = buf.get_i32_le();
16677        __struct.longitude = buf.get_i32_le();
16678        __struct.altitude = buf.get_i32_le();
16679        __struct.x = buf.get_f32_le();
16680        __struct.y = buf.get_f32_le();
16681        __struct.z = buf.get_f32_le();
16682        for v in &mut __struct.q {
16683            let val = buf.get_f32_le();
16684            *v = val;
16685        }
16686        __struct.approach_x = buf.get_f32_le();
16687        __struct.approach_y = buf.get_f32_le();
16688        __struct.approach_z = buf.get_f32_le();
16689        __struct.time_usec = buf.get_u64_le();
16690        Ok(__struct)
16691    }
16692    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16693        let mut __tmp = BytesMut::new(bytes);
16694        #[allow(clippy::absurd_extreme_comparisons)]
16695        #[allow(unused_comparisons)]
16696        if __tmp.remaining() < Self::ENCODED_LEN {
16697            panic!(
16698                "buffer is too small (need {} bytes, but got {})",
16699                Self::ENCODED_LEN,
16700                __tmp.remaining(),
16701            )
16702        }
16703        __tmp.put_i32_le(self.latitude);
16704        __tmp.put_i32_le(self.longitude);
16705        __tmp.put_i32_le(self.altitude);
16706        __tmp.put_f32_le(self.x);
16707        __tmp.put_f32_le(self.y);
16708        __tmp.put_f32_le(self.z);
16709        for val in &self.q {
16710            __tmp.put_f32_le(*val);
16711        }
16712        __tmp.put_f32_le(self.approach_x);
16713        __tmp.put_f32_le(self.approach_y);
16714        __tmp.put_f32_le(self.approach_z);
16715        if matches!(version, MavlinkVersion::V2) {
16716            __tmp.put_u64_le(self.time_usec);
16717            let len = __tmp.len();
16718            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16719        } else {
16720            __tmp.len()
16721        }
16722    }
16723}
16724#[doc = "Temperature and humidity from hygrometer."]
16725#[doc = ""]
16726#[doc = "ID: 12920"]
16727#[derive(Debug, Clone, PartialEq)]
16728#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16729#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16730#[cfg_attr(feature = "ts", derive(TS))]
16731#[cfg_attr(feature = "ts", ts(export))]
16732pub struct HYGROMETER_SENSOR_DATA {
16733    #[doc = "Temperature"]
16734    pub temperature: i16,
16735    #[doc = "Humidity"]
16736    pub humidity: u16,
16737    #[doc = "Hygrometer ID"]
16738    pub id: u8,
16739}
16740impl HYGROMETER_SENSOR_DATA {
16741    pub const ENCODED_LEN: usize = 5usize;
16742    pub const DEFAULT: Self = Self {
16743        temperature: 0_i16,
16744        humidity: 0_u16,
16745        id: 0_u8,
16746    };
16747    #[cfg(feature = "arbitrary")]
16748    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16749        use arbitrary::{Arbitrary, Unstructured};
16750        let mut buf = [0u8; 1024];
16751        rng.fill_bytes(&mut buf);
16752        let mut unstructured = Unstructured::new(&buf);
16753        Self::arbitrary(&mut unstructured).unwrap_or_default()
16754    }
16755}
16756impl Default for HYGROMETER_SENSOR_DATA {
16757    fn default() -> Self {
16758        Self::DEFAULT.clone()
16759    }
16760}
16761impl MessageData for HYGROMETER_SENSOR_DATA {
16762    type Message = MavMessage;
16763    const ID: u32 = 12920u32;
16764    const NAME: &'static str = "HYGROMETER_SENSOR";
16765    const EXTRA_CRC: u8 = 20u8;
16766    const ENCODED_LEN: usize = 5usize;
16767    fn deser(
16768        _version: MavlinkVersion,
16769        __input: &[u8],
16770    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16771        let avail_len = __input.len();
16772        let mut payload_buf = [0; Self::ENCODED_LEN];
16773        let mut buf = if avail_len < Self::ENCODED_LEN {
16774            payload_buf[0..avail_len].copy_from_slice(__input);
16775            Bytes::new(&payload_buf)
16776        } else {
16777            Bytes::new(__input)
16778        };
16779        let mut __struct = Self::default();
16780        __struct.temperature = buf.get_i16_le();
16781        __struct.humidity = buf.get_u16_le();
16782        __struct.id = buf.get_u8();
16783        Ok(__struct)
16784    }
16785    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16786        let mut __tmp = BytesMut::new(bytes);
16787        #[allow(clippy::absurd_extreme_comparisons)]
16788        #[allow(unused_comparisons)]
16789        if __tmp.remaining() < Self::ENCODED_LEN {
16790            panic!(
16791                "buffer is too small (need {} bytes, but got {})",
16792                Self::ENCODED_LEN,
16793                __tmp.remaining(),
16794            )
16795        }
16796        __tmp.put_i16_le(self.temperature);
16797        __tmp.put_u16_le(self.humidity);
16798        __tmp.put_u8(self.id);
16799        if matches!(version, MavlinkVersion::V2) {
16800            let len = __tmp.len();
16801            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16802        } else {
16803            __tmp.len()
16804        }
16805    }
16806}
16807#[doc = "Illuminator status."]
16808#[doc = ""]
16809#[doc = "ID: 440"]
16810#[derive(Debug, Clone, PartialEq)]
16811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16812#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16813#[cfg_attr(feature = "ts", derive(TS))]
16814#[cfg_attr(feature = "ts", ts(export))]
16815pub struct ILLUMINATOR_STATUS_DATA {
16816    #[doc = "Time since the start-up of the illuminator in ms"]
16817    pub uptime_ms: u32,
16818    #[doc = "Errors"]
16819    pub error_status: IlluminatorErrorFlags,
16820    #[doc = "Illuminator brightness"]
16821    pub brightness: f32,
16822    #[doc = "Illuminator strobing period in seconds"]
16823    pub strobe_period: f32,
16824    #[doc = "Illuminator strobing duty cycle"]
16825    pub strobe_duty_cycle: f32,
16826    #[doc = "Temperature in Celsius"]
16827    pub temp_c: f32,
16828    #[doc = "Minimum strobing period in seconds"]
16829    pub min_strobe_period: f32,
16830    #[doc = "Maximum strobing period in seconds"]
16831    pub max_strobe_period: f32,
16832    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
16833    pub enable: u8,
16834    #[doc = "Supported illuminator modes"]
16835    pub mode_bitmask: IlluminatorMode,
16836    #[doc = "Illuminator mode"]
16837    pub mode: IlluminatorMode,
16838}
16839impl ILLUMINATOR_STATUS_DATA {
16840    pub const ENCODED_LEN: usize = 35usize;
16841    pub const DEFAULT: Self = Self {
16842        uptime_ms: 0_u32,
16843        error_status: IlluminatorErrorFlags::DEFAULT,
16844        brightness: 0.0_f32,
16845        strobe_period: 0.0_f32,
16846        strobe_duty_cycle: 0.0_f32,
16847        temp_c: 0.0_f32,
16848        min_strobe_period: 0.0_f32,
16849        max_strobe_period: 0.0_f32,
16850        enable: 0_u8,
16851        mode_bitmask: IlluminatorMode::DEFAULT,
16852        mode: IlluminatorMode::DEFAULT,
16853    };
16854    #[cfg(feature = "arbitrary")]
16855    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16856        use arbitrary::{Arbitrary, Unstructured};
16857        let mut buf = [0u8; 1024];
16858        rng.fill_bytes(&mut buf);
16859        let mut unstructured = Unstructured::new(&buf);
16860        Self::arbitrary(&mut unstructured).unwrap_or_default()
16861    }
16862}
16863impl Default for ILLUMINATOR_STATUS_DATA {
16864    fn default() -> Self {
16865        Self::DEFAULT.clone()
16866    }
16867}
16868impl MessageData for ILLUMINATOR_STATUS_DATA {
16869    type Message = MavMessage;
16870    const ID: u32 = 440u32;
16871    const NAME: &'static str = "ILLUMINATOR_STATUS";
16872    const EXTRA_CRC: u8 = 66u8;
16873    const ENCODED_LEN: usize = 35usize;
16874    fn deser(
16875        _version: MavlinkVersion,
16876        __input: &[u8],
16877    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16878        let avail_len = __input.len();
16879        let mut payload_buf = [0; Self::ENCODED_LEN];
16880        let mut buf = if avail_len < Self::ENCODED_LEN {
16881            payload_buf[0..avail_len].copy_from_slice(__input);
16882            Bytes::new(&payload_buf)
16883        } else {
16884            Bytes::new(__input)
16885        };
16886        let mut __struct = Self::default();
16887        __struct.uptime_ms = buf.get_u32_le();
16888        let tmp = buf.get_u32_le();
16889        __struct.error_status = IlluminatorErrorFlags::from_bits(
16890            tmp & IlluminatorErrorFlags::all().bits(),
16891        )
16892        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16893            flag_type: "IlluminatorErrorFlags",
16894            value: tmp as u32,
16895        })?;
16896        __struct.brightness = buf.get_f32_le();
16897        __struct.strobe_period = buf.get_f32_le();
16898        __struct.strobe_duty_cycle = buf.get_f32_le();
16899        __struct.temp_c = buf.get_f32_le();
16900        __struct.min_strobe_period = buf.get_f32_le();
16901        __struct.max_strobe_period = buf.get_f32_le();
16902        __struct.enable = buf.get_u8();
16903        let tmp = buf.get_u8();
16904        __struct.mode_bitmask =
16905            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16906                enum_type: "IlluminatorMode",
16907                value: tmp as u32,
16908            })?;
16909        let tmp = buf.get_u8();
16910        __struct.mode =
16911            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16912                enum_type: "IlluminatorMode",
16913                value: tmp as u32,
16914            })?;
16915        Ok(__struct)
16916    }
16917    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16918        let mut __tmp = BytesMut::new(bytes);
16919        #[allow(clippy::absurd_extreme_comparisons)]
16920        #[allow(unused_comparisons)]
16921        if __tmp.remaining() < Self::ENCODED_LEN {
16922            panic!(
16923                "buffer is too small (need {} bytes, but got {})",
16924                Self::ENCODED_LEN,
16925                __tmp.remaining(),
16926            )
16927        }
16928        __tmp.put_u32_le(self.uptime_ms);
16929        __tmp.put_u32_le(self.error_status.bits());
16930        __tmp.put_f32_le(self.brightness);
16931        __tmp.put_f32_le(self.strobe_period);
16932        __tmp.put_f32_le(self.strobe_duty_cycle);
16933        __tmp.put_f32_le(self.temp_c);
16934        __tmp.put_f32_le(self.min_strobe_period);
16935        __tmp.put_f32_le(self.max_strobe_period);
16936        __tmp.put_u8(self.enable);
16937        __tmp.put_u8(self.mode_bitmask as u8);
16938        __tmp.put_u8(self.mode as u8);
16939        if matches!(version, MavlinkVersion::V2) {
16940            let len = __tmp.len();
16941            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16942        } else {
16943            __tmp.len()
16944        }
16945    }
16946}
16947#[doc = "Status of the Iridium SBD link."]
16948#[doc = ""]
16949#[doc = "ID: 335"]
16950#[derive(Debug, Clone, PartialEq)]
16951#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16952#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16953#[cfg_attr(feature = "ts", derive(TS))]
16954#[cfg_attr(feature = "ts", ts(export))]
16955pub struct ISBD_LINK_STATUS_DATA {
16956    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16957    pub timestamp: u64,
16958    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16959    pub last_heartbeat: u64,
16960    #[doc = "Number of failed SBD sessions."]
16961    pub failed_sessions: u16,
16962    #[doc = "Number of successful SBD sessions."]
16963    pub successful_sessions: u16,
16964    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
16965    pub signal_quality: u8,
16966    #[doc = "1: Ring call pending, 0: No call pending."]
16967    pub ring_pending: u8,
16968    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
16969    pub tx_session_pending: u8,
16970    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
16971    pub rx_session_pending: u8,
16972}
16973impl ISBD_LINK_STATUS_DATA {
16974    pub const ENCODED_LEN: usize = 24usize;
16975    pub const DEFAULT: Self = Self {
16976        timestamp: 0_u64,
16977        last_heartbeat: 0_u64,
16978        failed_sessions: 0_u16,
16979        successful_sessions: 0_u16,
16980        signal_quality: 0_u8,
16981        ring_pending: 0_u8,
16982        tx_session_pending: 0_u8,
16983        rx_session_pending: 0_u8,
16984    };
16985    #[cfg(feature = "arbitrary")]
16986    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16987        use arbitrary::{Arbitrary, Unstructured};
16988        let mut buf = [0u8; 1024];
16989        rng.fill_bytes(&mut buf);
16990        let mut unstructured = Unstructured::new(&buf);
16991        Self::arbitrary(&mut unstructured).unwrap_or_default()
16992    }
16993}
16994impl Default for ISBD_LINK_STATUS_DATA {
16995    fn default() -> Self {
16996        Self::DEFAULT.clone()
16997    }
16998}
16999impl MessageData for ISBD_LINK_STATUS_DATA {
17000    type Message = MavMessage;
17001    const ID: u32 = 335u32;
17002    const NAME: &'static str = "ISBD_LINK_STATUS";
17003    const EXTRA_CRC: u8 = 225u8;
17004    const ENCODED_LEN: usize = 24usize;
17005    fn deser(
17006        _version: MavlinkVersion,
17007        __input: &[u8],
17008    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17009        let avail_len = __input.len();
17010        let mut payload_buf = [0; Self::ENCODED_LEN];
17011        let mut buf = if avail_len < Self::ENCODED_LEN {
17012            payload_buf[0..avail_len].copy_from_slice(__input);
17013            Bytes::new(&payload_buf)
17014        } else {
17015            Bytes::new(__input)
17016        };
17017        let mut __struct = Self::default();
17018        __struct.timestamp = buf.get_u64_le();
17019        __struct.last_heartbeat = buf.get_u64_le();
17020        __struct.failed_sessions = buf.get_u16_le();
17021        __struct.successful_sessions = buf.get_u16_le();
17022        __struct.signal_quality = buf.get_u8();
17023        __struct.ring_pending = buf.get_u8();
17024        __struct.tx_session_pending = buf.get_u8();
17025        __struct.rx_session_pending = buf.get_u8();
17026        Ok(__struct)
17027    }
17028    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17029        let mut __tmp = BytesMut::new(bytes);
17030        #[allow(clippy::absurd_extreme_comparisons)]
17031        #[allow(unused_comparisons)]
17032        if __tmp.remaining() < Self::ENCODED_LEN {
17033            panic!(
17034                "buffer is too small (need {} bytes, but got {})",
17035                Self::ENCODED_LEN,
17036                __tmp.remaining(),
17037            )
17038        }
17039        __tmp.put_u64_le(self.timestamp);
17040        __tmp.put_u64_le(self.last_heartbeat);
17041        __tmp.put_u16_le(self.failed_sessions);
17042        __tmp.put_u16_le(self.successful_sessions);
17043        __tmp.put_u8(self.signal_quality);
17044        __tmp.put_u8(self.ring_pending);
17045        __tmp.put_u8(self.tx_session_pending);
17046        __tmp.put_u8(self.rx_session_pending);
17047        if matches!(version, MavlinkVersion::V2) {
17048            let len = __tmp.len();
17049            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17050        } else {
17051            __tmp.len()
17052        }
17053    }
17054}
17055#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
17056#[doc = ""]
17057#[doc = "ID: 149"]
17058#[derive(Debug, Clone, PartialEq)]
17059#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17060#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17061#[cfg_attr(feature = "ts", derive(TS))]
17062#[cfg_attr(feature = "ts", ts(export))]
17063pub struct LANDING_TARGET_DATA {
17064    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17065    pub time_usec: u64,
17066    #[doc = "X-axis angular offset of the target from the center of the image"]
17067    pub angle_x: f32,
17068    #[doc = "Y-axis angular offset of the target from the center of the image"]
17069    pub angle_y: f32,
17070    #[doc = "Distance to the target from the vehicle"]
17071    pub distance: f32,
17072    #[doc = "Size of target along x-axis"]
17073    pub size_x: f32,
17074    #[doc = "Size of target along y-axis"]
17075    pub size_y: f32,
17076    #[doc = "The ID of the target if multiple targets are present"]
17077    pub target_num: u8,
17078    #[doc = "Coordinate frame used for following fields."]
17079    pub frame: MavFrame,
17080    #[doc = "X Position of the landing target in MAV_FRAME"]
17081    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17082    pub x: f32,
17083    #[doc = "Y Position of the landing target in MAV_FRAME"]
17084    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17085    pub y: f32,
17086    #[doc = "Z Position of the landing target in MAV_FRAME"]
17087    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17088    pub z: f32,
17089    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
17090    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17091    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17092    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17093    pub q: [f32; 4],
17094    #[doc = "Type of landing target"]
17095    #[cfg_attr(feature = "serde", serde(default))]
17096    pub mavtype: LandingTargetType,
17097    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
17098    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17099    pub position_valid: u8,
17100}
17101impl LANDING_TARGET_DATA {
17102    pub const ENCODED_LEN: usize = 60usize;
17103    pub const DEFAULT: Self = Self {
17104        time_usec: 0_u64,
17105        angle_x: 0.0_f32,
17106        angle_y: 0.0_f32,
17107        distance: 0.0_f32,
17108        size_x: 0.0_f32,
17109        size_y: 0.0_f32,
17110        target_num: 0_u8,
17111        frame: MavFrame::DEFAULT,
17112        x: 0.0_f32,
17113        y: 0.0_f32,
17114        z: 0.0_f32,
17115        q: [0.0_f32; 4usize],
17116        mavtype: LandingTargetType::DEFAULT,
17117        position_valid: 0_u8,
17118    };
17119    #[cfg(feature = "arbitrary")]
17120    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17121        use arbitrary::{Arbitrary, Unstructured};
17122        let mut buf = [0u8; 1024];
17123        rng.fill_bytes(&mut buf);
17124        let mut unstructured = Unstructured::new(&buf);
17125        Self::arbitrary(&mut unstructured).unwrap_or_default()
17126    }
17127}
17128impl Default for LANDING_TARGET_DATA {
17129    fn default() -> Self {
17130        Self::DEFAULT.clone()
17131    }
17132}
17133impl MessageData for LANDING_TARGET_DATA {
17134    type Message = MavMessage;
17135    const ID: u32 = 149u32;
17136    const NAME: &'static str = "LANDING_TARGET";
17137    const EXTRA_CRC: u8 = 200u8;
17138    const ENCODED_LEN: usize = 60usize;
17139    fn deser(
17140        _version: MavlinkVersion,
17141        __input: &[u8],
17142    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17143        let avail_len = __input.len();
17144        let mut payload_buf = [0; Self::ENCODED_LEN];
17145        let mut buf = if avail_len < Self::ENCODED_LEN {
17146            payload_buf[0..avail_len].copy_from_slice(__input);
17147            Bytes::new(&payload_buf)
17148        } else {
17149            Bytes::new(__input)
17150        };
17151        let mut __struct = Self::default();
17152        __struct.time_usec = buf.get_u64_le();
17153        __struct.angle_x = buf.get_f32_le();
17154        __struct.angle_y = buf.get_f32_le();
17155        __struct.distance = buf.get_f32_le();
17156        __struct.size_x = buf.get_f32_le();
17157        __struct.size_y = buf.get_f32_le();
17158        __struct.target_num = buf.get_u8();
17159        let tmp = buf.get_u8();
17160        __struct.frame =
17161            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17162                enum_type: "MavFrame",
17163                value: tmp as u32,
17164            })?;
17165        __struct.x = buf.get_f32_le();
17166        __struct.y = buf.get_f32_le();
17167        __struct.z = buf.get_f32_le();
17168        for v in &mut __struct.q {
17169            let val = buf.get_f32_le();
17170            *v = val;
17171        }
17172        let tmp = buf.get_u8();
17173        __struct.mavtype =
17174            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17175                enum_type: "LandingTargetType",
17176                value: tmp as u32,
17177            })?;
17178        __struct.position_valid = buf.get_u8();
17179        Ok(__struct)
17180    }
17181    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17182        let mut __tmp = BytesMut::new(bytes);
17183        #[allow(clippy::absurd_extreme_comparisons)]
17184        #[allow(unused_comparisons)]
17185        if __tmp.remaining() < Self::ENCODED_LEN {
17186            panic!(
17187                "buffer is too small (need {} bytes, but got {})",
17188                Self::ENCODED_LEN,
17189                __tmp.remaining(),
17190            )
17191        }
17192        __tmp.put_u64_le(self.time_usec);
17193        __tmp.put_f32_le(self.angle_x);
17194        __tmp.put_f32_le(self.angle_y);
17195        __tmp.put_f32_le(self.distance);
17196        __tmp.put_f32_le(self.size_x);
17197        __tmp.put_f32_le(self.size_y);
17198        __tmp.put_u8(self.target_num);
17199        __tmp.put_u8(self.frame as u8);
17200        if matches!(version, MavlinkVersion::V2) {
17201            __tmp.put_f32_le(self.x);
17202            __tmp.put_f32_le(self.y);
17203            __tmp.put_f32_le(self.z);
17204            for val in &self.q {
17205                __tmp.put_f32_le(*val);
17206            }
17207            __tmp.put_u8(self.mavtype as u8);
17208            __tmp.put_u8(self.position_valid);
17209            let len = __tmp.len();
17210            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17211        } else {
17212            __tmp.len()
17213        }
17214    }
17215}
17216#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
17217#[doc = ""]
17218#[doc = "ID: 8"]
17219#[derive(Debug, Clone, PartialEq)]
17220#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17221#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17222#[cfg_attr(feature = "ts", derive(TS))]
17223#[cfg_attr(feature = "ts", ts(export))]
17224pub struct LINK_NODE_STATUS_DATA {
17225    #[doc = "Timestamp (time since system boot)."]
17226    pub timestamp: u64,
17227    #[doc = "Transmit rate"]
17228    pub tx_rate: u32,
17229    #[doc = "Receive rate"]
17230    pub rx_rate: u32,
17231    #[doc = "Messages sent"]
17232    pub messages_sent: u32,
17233    #[doc = "Messages received (estimated from counting seq)"]
17234    pub messages_received: u32,
17235    #[doc = "Messages lost (estimated from counting seq)"]
17236    pub messages_lost: u32,
17237    #[doc = "Number of bytes that could not be parsed correctly."]
17238    pub rx_parse_err: u16,
17239    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17240    pub tx_overflows: u16,
17241    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17242    pub rx_overflows: u16,
17243    #[doc = "Remaining free transmit buffer space"]
17244    pub tx_buf: u8,
17245    #[doc = "Remaining free receive buffer space"]
17246    pub rx_buf: u8,
17247}
17248impl LINK_NODE_STATUS_DATA {
17249    pub const ENCODED_LEN: usize = 36usize;
17250    pub const DEFAULT: Self = Self {
17251        timestamp: 0_u64,
17252        tx_rate: 0_u32,
17253        rx_rate: 0_u32,
17254        messages_sent: 0_u32,
17255        messages_received: 0_u32,
17256        messages_lost: 0_u32,
17257        rx_parse_err: 0_u16,
17258        tx_overflows: 0_u16,
17259        rx_overflows: 0_u16,
17260        tx_buf: 0_u8,
17261        rx_buf: 0_u8,
17262    };
17263    #[cfg(feature = "arbitrary")]
17264    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17265        use arbitrary::{Arbitrary, Unstructured};
17266        let mut buf = [0u8; 1024];
17267        rng.fill_bytes(&mut buf);
17268        let mut unstructured = Unstructured::new(&buf);
17269        Self::arbitrary(&mut unstructured).unwrap_or_default()
17270    }
17271}
17272impl Default for LINK_NODE_STATUS_DATA {
17273    fn default() -> Self {
17274        Self::DEFAULT.clone()
17275    }
17276}
17277impl MessageData for LINK_NODE_STATUS_DATA {
17278    type Message = MavMessage;
17279    const ID: u32 = 8u32;
17280    const NAME: &'static str = "LINK_NODE_STATUS";
17281    const EXTRA_CRC: u8 = 117u8;
17282    const ENCODED_LEN: usize = 36usize;
17283    fn deser(
17284        _version: MavlinkVersion,
17285        __input: &[u8],
17286    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17287        let avail_len = __input.len();
17288        let mut payload_buf = [0; Self::ENCODED_LEN];
17289        let mut buf = if avail_len < Self::ENCODED_LEN {
17290            payload_buf[0..avail_len].copy_from_slice(__input);
17291            Bytes::new(&payload_buf)
17292        } else {
17293            Bytes::new(__input)
17294        };
17295        let mut __struct = Self::default();
17296        __struct.timestamp = buf.get_u64_le();
17297        __struct.tx_rate = buf.get_u32_le();
17298        __struct.rx_rate = buf.get_u32_le();
17299        __struct.messages_sent = buf.get_u32_le();
17300        __struct.messages_received = buf.get_u32_le();
17301        __struct.messages_lost = buf.get_u32_le();
17302        __struct.rx_parse_err = buf.get_u16_le();
17303        __struct.tx_overflows = buf.get_u16_le();
17304        __struct.rx_overflows = buf.get_u16_le();
17305        __struct.tx_buf = buf.get_u8();
17306        __struct.rx_buf = buf.get_u8();
17307        Ok(__struct)
17308    }
17309    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17310        let mut __tmp = BytesMut::new(bytes);
17311        #[allow(clippy::absurd_extreme_comparisons)]
17312        #[allow(unused_comparisons)]
17313        if __tmp.remaining() < Self::ENCODED_LEN {
17314            panic!(
17315                "buffer is too small (need {} bytes, but got {})",
17316                Self::ENCODED_LEN,
17317                __tmp.remaining(),
17318            )
17319        }
17320        __tmp.put_u64_le(self.timestamp);
17321        __tmp.put_u32_le(self.tx_rate);
17322        __tmp.put_u32_le(self.rx_rate);
17323        __tmp.put_u32_le(self.messages_sent);
17324        __tmp.put_u32_le(self.messages_received);
17325        __tmp.put_u32_le(self.messages_lost);
17326        __tmp.put_u16_le(self.rx_parse_err);
17327        __tmp.put_u16_le(self.tx_overflows);
17328        __tmp.put_u16_le(self.rx_overflows);
17329        __tmp.put_u8(self.tx_buf);
17330        __tmp.put_u8(self.rx_buf);
17331        if matches!(version, MavlinkVersion::V2) {
17332            let len = __tmp.len();
17333            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17334        } else {
17335            __tmp.len()
17336        }
17337    }
17338}
17339#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17340#[doc = ""]
17341#[doc = "ID: 32"]
17342#[derive(Debug, Clone, PartialEq)]
17343#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17344#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17345#[cfg_attr(feature = "ts", derive(TS))]
17346#[cfg_attr(feature = "ts", ts(export))]
17347pub struct LOCAL_POSITION_NED_DATA {
17348    #[doc = "Timestamp (time since system boot)."]
17349    pub time_boot_ms: u32,
17350    #[doc = "X Position"]
17351    pub x: f32,
17352    #[doc = "Y Position"]
17353    pub y: f32,
17354    #[doc = "Z Position"]
17355    pub z: f32,
17356    #[doc = "X Speed"]
17357    pub vx: f32,
17358    #[doc = "Y Speed"]
17359    pub vy: f32,
17360    #[doc = "Z Speed"]
17361    pub vz: f32,
17362}
17363impl LOCAL_POSITION_NED_DATA {
17364    pub const ENCODED_LEN: usize = 28usize;
17365    pub const DEFAULT: Self = Self {
17366        time_boot_ms: 0_u32,
17367        x: 0.0_f32,
17368        y: 0.0_f32,
17369        z: 0.0_f32,
17370        vx: 0.0_f32,
17371        vy: 0.0_f32,
17372        vz: 0.0_f32,
17373    };
17374    #[cfg(feature = "arbitrary")]
17375    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17376        use arbitrary::{Arbitrary, Unstructured};
17377        let mut buf = [0u8; 1024];
17378        rng.fill_bytes(&mut buf);
17379        let mut unstructured = Unstructured::new(&buf);
17380        Self::arbitrary(&mut unstructured).unwrap_or_default()
17381    }
17382}
17383impl Default for LOCAL_POSITION_NED_DATA {
17384    fn default() -> Self {
17385        Self::DEFAULT.clone()
17386    }
17387}
17388impl MessageData for LOCAL_POSITION_NED_DATA {
17389    type Message = MavMessage;
17390    const ID: u32 = 32u32;
17391    const NAME: &'static str = "LOCAL_POSITION_NED";
17392    const EXTRA_CRC: u8 = 185u8;
17393    const ENCODED_LEN: usize = 28usize;
17394    fn deser(
17395        _version: MavlinkVersion,
17396        __input: &[u8],
17397    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17398        let avail_len = __input.len();
17399        let mut payload_buf = [0; Self::ENCODED_LEN];
17400        let mut buf = if avail_len < Self::ENCODED_LEN {
17401            payload_buf[0..avail_len].copy_from_slice(__input);
17402            Bytes::new(&payload_buf)
17403        } else {
17404            Bytes::new(__input)
17405        };
17406        let mut __struct = Self::default();
17407        __struct.time_boot_ms = buf.get_u32_le();
17408        __struct.x = buf.get_f32_le();
17409        __struct.y = buf.get_f32_le();
17410        __struct.z = buf.get_f32_le();
17411        __struct.vx = buf.get_f32_le();
17412        __struct.vy = buf.get_f32_le();
17413        __struct.vz = buf.get_f32_le();
17414        Ok(__struct)
17415    }
17416    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17417        let mut __tmp = BytesMut::new(bytes);
17418        #[allow(clippy::absurd_extreme_comparisons)]
17419        #[allow(unused_comparisons)]
17420        if __tmp.remaining() < Self::ENCODED_LEN {
17421            panic!(
17422                "buffer is too small (need {} bytes, but got {})",
17423                Self::ENCODED_LEN,
17424                __tmp.remaining(),
17425            )
17426        }
17427        __tmp.put_u32_le(self.time_boot_ms);
17428        __tmp.put_f32_le(self.x);
17429        __tmp.put_f32_le(self.y);
17430        __tmp.put_f32_le(self.z);
17431        __tmp.put_f32_le(self.vx);
17432        __tmp.put_f32_le(self.vy);
17433        __tmp.put_f32_le(self.vz);
17434        if matches!(version, MavlinkVersion::V2) {
17435            let len = __tmp.len();
17436            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17437        } else {
17438            __tmp.len()
17439        }
17440    }
17441}
17442#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17443#[doc = ""]
17444#[doc = "ID: 64"]
17445#[derive(Debug, Clone, PartialEq)]
17446#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17447#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17448#[cfg_attr(feature = "ts", derive(TS))]
17449#[cfg_attr(feature = "ts", ts(export))]
17450pub struct LOCAL_POSITION_NED_COV_DATA {
17451    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17452    pub time_usec: u64,
17453    #[doc = "X Position"]
17454    pub x: f32,
17455    #[doc = "Y Position"]
17456    pub y: f32,
17457    #[doc = "Z Position"]
17458    pub z: f32,
17459    #[doc = "X Speed"]
17460    pub vx: f32,
17461    #[doc = "Y Speed"]
17462    pub vy: f32,
17463    #[doc = "Z Speed"]
17464    pub vz: f32,
17465    #[doc = "X Acceleration"]
17466    pub ax: f32,
17467    #[doc = "Y Acceleration"]
17468    pub ay: f32,
17469    #[doc = "Z Acceleration"]
17470    pub az: f32,
17471    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
17472    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17473    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17474    pub covariance: [f32; 45],
17475    #[doc = "Class id of the estimator this estimate originated from."]
17476    pub estimator_type: MavEstimatorType,
17477}
17478impl LOCAL_POSITION_NED_COV_DATA {
17479    pub const ENCODED_LEN: usize = 225usize;
17480    pub const DEFAULT: Self = Self {
17481        time_usec: 0_u64,
17482        x: 0.0_f32,
17483        y: 0.0_f32,
17484        z: 0.0_f32,
17485        vx: 0.0_f32,
17486        vy: 0.0_f32,
17487        vz: 0.0_f32,
17488        ax: 0.0_f32,
17489        ay: 0.0_f32,
17490        az: 0.0_f32,
17491        covariance: [0.0_f32; 45usize],
17492        estimator_type: MavEstimatorType::DEFAULT,
17493    };
17494    #[cfg(feature = "arbitrary")]
17495    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17496        use arbitrary::{Arbitrary, Unstructured};
17497        let mut buf = [0u8; 1024];
17498        rng.fill_bytes(&mut buf);
17499        let mut unstructured = Unstructured::new(&buf);
17500        Self::arbitrary(&mut unstructured).unwrap_or_default()
17501    }
17502}
17503impl Default for LOCAL_POSITION_NED_COV_DATA {
17504    fn default() -> Self {
17505        Self::DEFAULT.clone()
17506    }
17507}
17508impl MessageData for LOCAL_POSITION_NED_COV_DATA {
17509    type Message = MavMessage;
17510    const ID: u32 = 64u32;
17511    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
17512    const EXTRA_CRC: u8 = 191u8;
17513    const ENCODED_LEN: usize = 225usize;
17514    fn deser(
17515        _version: MavlinkVersion,
17516        __input: &[u8],
17517    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17518        let avail_len = __input.len();
17519        let mut payload_buf = [0; Self::ENCODED_LEN];
17520        let mut buf = if avail_len < Self::ENCODED_LEN {
17521            payload_buf[0..avail_len].copy_from_slice(__input);
17522            Bytes::new(&payload_buf)
17523        } else {
17524            Bytes::new(__input)
17525        };
17526        let mut __struct = Self::default();
17527        __struct.time_usec = buf.get_u64_le();
17528        __struct.x = buf.get_f32_le();
17529        __struct.y = buf.get_f32_le();
17530        __struct.z = buf.get_f32_le();
17531        __struct.vx = buf.get_f32_le();
17532        __struct.vy = buf.get_f32_le();
17533        __struct.vz = buf.get_f32_le();
17534        __struct.ax = buf.get_f32_le();
17535        __struct.ay = buf.get_f32_le();
17536        __struct.az = buf.get_f32_le();
17537        for v in &mut __struct.covariance {
17538            let val = buf.get_f32_le();
17539            *v = val;
17540        }
17541        let tmp = buf.get_u8();
17542        __struct.estimator_type =
17543            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17544                enum_type: "MavEstimatorType",
17545                value: tmp as u32,
17546            })?;
17547        Ok(__struct)
17548    }
17549    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17550        let mut __tmp = BytesMut::new(bytes);
17551        #[allow(clippy::absurd_extreme_comparisons)]
17552        #[allow(unused_comparisons)]
17553        if __tmp.remaining() < Self::ENCODED_LEN {
17554            panic!(
17555                "buffer is too small (need {} bytes, but got {})",
17556                Self::ENCODED_LEN,
17557                __tmp.remaining(),
17558            )
17559        }
17560        __tmp.put_u64_le(self.time_usec);
17561        __tmp.put_f32_le(self.x);
17562        __tmp.put_f32_le(self.y);
17563        __tmp.put_f32_le(self.z);
17564        __tmp.put_f32_le(self.vx);
17565        __tmp.put_f32_le(self.vy);
17566        __tmp.put_f32_le(self.vz);
17567        __tmp.put_f32_le(self.ax);
17568        __tmp.put_f32_le(self.ay);
17569        __tmp.put_f32_le(self.az);
17570        for val in &self.covariance {
17571            __tmp.put_f32_le(*val);
17572        }
17573        __tmp.put_u8(self.estimator_type as u8);
17574        if matches!(version, MavlinkVersion::V2) {
17575            let len = __tmp.len();
17576            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17577        } else {
17578            __tmp.len()
17579        }
17580    }
17581}
17582#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17583#[doc = ""]
17584#[doc = "ID: 89"]
17585#[derive(Debug, Clone, PartialEq)]
17586#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17587#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17588#[cfg_attr(feature = "ts", derive(TS))]
17589#[cfg_attr(feature = "ts", ts(export))]
17590pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17591    #[doc = "Timestamp (time since system boot)."]
17592    pub time_boot_ms: u32,
17593    #[doc = "X Position"]
17594    pub x: f32,
17595    #[doc = "Y Position"]
17596    pub y: f32,
17597    #[doc = "Z Position"]
17598    pub z: f32,
17599    #[doc = "Roll"]
17600    pub roll: f32,
17601    #[doc = "Pitch"]
17602    pub pitch: f32,
17603    #[doc = "Yaw"]
17604    pub yaw: f32,
17605}
17606impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17607    pub const ENCODED_LEN: usize = 28usize;
17608    pub const DEFAULT: Self = Self {
17609        time_boot_ms: 0_u32,
17610        x: 0.0_f32,
17611        y: 0.0_f32,
17612        z: 0.0_f32,
17613        roll: 0.0_f32,
17614        pitch: 0.0_f32,
17615        yaw: 0.0_f32,
17616    };
17617    #[cfg(feature = "arbitrary")]
17618    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17619        use arbitrary::{Arbitrary, Unstructured};
17620        let mut buf = [0u8; 1024];
17621        rng.fill_bytes(&mut buf);
17622        let mut unstructured = Unstructured::new(&buf);
17623        Self::arbitrary(&mut unstructured).unwrap_or_default()
17624    }
17625}
17626impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17627    fn default() -> Self {
17628        Self::DEFAULT.clone()
17629    }
17630}
17631impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17632    type Message = MavMessage;
17633    const ID: u32 = 89u32;
17634    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
17635    const EXTRA_CRC: u8 = 231u8;
17636    const ENCODED_LEN: usize = 28usize;
17637    fn deser(
17638        _version: MavlinkVersion,
17639        __input: &[u8],
17640    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17641        let avail_len = __input.len();
17642        let mut payload_buf = [0; Self::ENCODED_LEN];
17643        let mut buf = if avail_len < Self::ENCODED_LEN {
17644            payload_buf[0..avail_len].copy_from_slice(__input);
17645            Bytes::new(&payload_buf)
17646        } else {
17647            Bytes::new(__input)
17648        };
17649        let mut __struct = Self::default();
17650        __struct.time_boot_ms = buf.get_u32_le();
17651        __struct.x = buf.get_f32_le();
17652        __struct.y = buf.get_f32_le();
17653        __struct.z = buf.get_f32_le();
17654        __struct.roll = buf.get_f32_le();
17655        __struct.pitch = buf.get_f32_le();
17656        __struct.yaw = buf.get_f32_le();
17657        Ok(__struct)
17658    }
17659    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17660        let mut __tmp = BytesMut::new(bytes);
17661        #[allow(clippy::absurd_extreme_comparisons)]
17662        #[allow(unused_comparisons)]
17663        if __tmp.remaining() < Self::ENCODED_LEN {
17664            panic!(
17665                "buffer is too small (need {} bytes, but got {})",
17666                Self::ENCODED_LEN,
17667                __tmp.remaining(),
17668            )
17669        }
17670        __tmp.put_u32_le(self.time_boot_ms);
17671        __tmp.put_f32_le(self.x);
17672        __tmp.put_f32_le(self.y);
17673        __tmp.put_f32_le(self.z);
17674        __tmp.put_f32_le(self.roll);
17675        __tmp.put_f32_le(self.pitch);
17676        __tmp.put_f32_le(self.yaw);
17677        if matches!(version, MavlinkVersion::V2) {
17678            let len = __tmp.len();
17679            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17680        } else {
17681            __tmp.len()
17682        }
17683    }
17684}
17685#[doc = "An ack for a LOGGING_DATA_ACKED message."]
17686#[doc = ""]
17687#[doc = "ID: 268"]
17688#[derive(Debug, Clone, PartialEq)]
17689#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17690#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17691#[cfg_attr(feature = "ts", derive(TS))]
17692#[cfg_attr(feature = "ts", ts(export))]
17693pub struct LOGGING_ACK_DATA {
17694    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
17695    pub sequence: u16,
17696    #[doc = "system ID of the target"]
17697    pub target_system: u8,
17698    #[doc = "component ID of the target"]
17699    pub target_component: u8,
17700}
17701impl LOGGING_ACK_DATA {
17702    pub const ENCODED_LEN: usize = 4usize;
17703    pub const DEFAULT: Self = Self {
17704        sequence: 0_u16,
17705        target_system: 0_u8,
17706        target_component: 0_u8,
17707    };
17708    #[cfg(feature = "arbitrary")]
17709    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17710        use arbitrary::{Arbitrary, Unstructured};
17711        let mut buf = [0u8; 1024];
17712        rng.fill_bytes(&mut buf);
17713        let mut unstructured = Unstructured::new(&buf);
17714        Self::arbitrary(&mut unstructured).unwrap_or_default()
17715    }
17716}
17717impl Default for LOGGING_ACK_DATA {
17718    fn default() -> Self {
17719        Self::DEFAULT.clone()
17720    }
17721}
17722impl MessageData for LOGGING_ACK_DATA {
17723    type Message = MavMessage;
17724    const ID: u32 = 268u32;
17725    const NAME: &'static str = "LOGGING_ACK";
17726    const EXTRA_CRC: u8 = 14u8;
17727    const ENCODED_LEN: usize = 4usize;
17728    fn deser(
17729        _version: MavlinkVersion,
17730        __input: &[u8],
17731    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17732        let avail_len = __input.len();
17733        let mut payload_buf = [0; Self::ENCODED_LEN];
17734        let mut buf = if avail_len < Self::ENCODED_LEN {
17735            payload_buf[0..avail_len].copy_from_slice(__input);
17736            Bytes::new(&payload_buf)
17737        } else {
17738            Bytes::new(__input)
17739        };
17740        let mut __struct = Self::default();
17741        __struct.sequence = buf.get_u16_le();
17742        __struct.target_system = buf.get_u8();
17743        __struct.target_component = buf.get_u8();
17744        Ok(__struct)
17745    }
17746    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17747        let mut __tmp = BytesMut::new(bytes);
17748        #[allow(clippy::absurd_extreme_comparisons)]
17749        #[allow(unused_comparisons)]
17750        if __tmp.remaining() < Self::ENCODED_LEN {
17751            panic!(
17752                "buffer is too small (need {} bytes, but got {})",
17753                Self::ENCODED_LEN,
17754                __tmp.remaining(),
17755            )
17756        }
17757        __tmp.put_u16_le(self.sequence);
17758        __tmp.put_u8(self.target_system);
17759        __tmp.put_u8(self.target_component);
17760        if matches!(version, MavlinkVersion::V2) {
17761            let len = __tmp.len();
17762            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17763        } else {
17764            __tmp.len()
17765        }
17766    }
17767}
17768#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
17769#[doc = ""]
17770#[doc = "ID: 266"]
17771#[derive(Debug, Clone, PartialEq)]
17772#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17773#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17774#[cfg_attr(feature = "ts", derive(TS))]
17775#[cfg_attr(feature = "ts", ts(export))]
17776pub struct LOGGING_DATA_DATA {
17777    #[doc = "sequence number (can wrap)"]
17778    pub sequence: u16,
17779    #[doc = "system ID of the target"]
17780    pub target_system: u8,
17781    #[doc = "component ID of the target"]
17782    pub target_component: u8,
17783    #[doc = "data length"]
17784    pub length: u8,
17785    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
17786    pub first_message_offset: u8,
17787    #[doc = "logged data"]
17788    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17789    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17790    pub data: [u8; 249],
17791}
17792impl LOGGING_DATA_DATA {
17793    pub const ENCODED_LEN: usize = 255usize;
17794    pub const DEFAULT: Self = Self {
17795        sequence: 0_u16,
17796        target_system: 0_u8,
17797        target_component: 0_u8,
17798        length: 0_u8,
17799        first_message_offset: 0_u8,
17800        data: [0_u8; 249usize],
17801    };
17802    #[cfg(feature = "arbitrary")]
17803    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17804        use arbitrary::{Arbitrary, Unstructured};
17805        let mut buf = [0u8; 1024];
17806        rng.fill_bytes(&mut buf);
17807        let mut unstructured = Unstructured::new(&buf);
17808        Self::arbitrary(&mut unstructured).unwrap_or_default()
17809    }
17810}
17811impl Default for LOGGING_DATA_DATA {
17812    fn default() -> Self {
17813        Self::DEFAULT.clone()
17814    }
17815}
17816impl MessageData for LOGGING_DATA_DATA {
17817    type Message = MavMessage;
17818    const ID: u32 = 266u32;
17819    const NAME: &'static str = "LOGGING_DATA";
17820    const EXTRA_CRC: u8 = 193u8;
17821    const ENCODED_LEN: usize = 255usize;
17822    fn deser(
17823        _version: MavlinkVersion,
17824        __input: &[u8],
17825    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17826        let avail_len = __input.len();
17827        let mut payload_buf = [0; Self::ENCODED_LEN];
17828        let mut buf = if avail_len < Self::ENCODED_LEN {
17829            payload_buf[0..avail_len].copy_from_slice(__input);
17830            Bytes::new(&payload_buf)
17831        } else {
17832            Bytes::new(__input)
17833        };
17834        let mut __struct = Self::default();
17835        __struct.sequence = buf.get_u16_le();
17836        __struct.target_system = buf.get_u8();
17837        __struct.target_component = buf.get_u8();
17838        __struct.length = buf.get_u8();
17839        __struct.first_message_offset = buf.get_u8();
17840        for v in &mut __struct.data {
17841            let val = buf.get_u8();
17842            *v = val;
17843        }
17844        Ok(__struct)
17845    }
17846    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17847        let mut __tmp = BytesMut::new(bytes);
17848        #[allow(clippy::absurd_extreme_comparisons)]
17849        #[allow(unused_comparisons)]
17850        if __tmp.remaining() < Self::ENCODED_LEN {
17851            panic!(
17852                "buffer is too small (need {} bytes, but got {})",
17853                Self::ENCODED_LEN,
17854                __tmp.remaining(),
17855            )
17856        }
17857        __tmp.put_u16_le(self.sequence);
17858        __tmp.put_u8(self.target_system);
17859        __tmp.put_u8(self.target_component);
17860        __tmp.put_u8(self.length);
17861        __tmp.put_u8(self.first_message_offset);
17862        for val in &self.data {
17863            __tmp.put_u8(*val);
17864        }
17865        if matches!(version, MavlinkVersion::V2) {
17866            let len = __tmp.len();
17867            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17868        } else {
17869            __tmp.len()
17870        }
17871    }
17872}
17873#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
17874#[doc = ""]
17875#[doc = "ID: 267"]
17876#[derive(Debug, Clone, PartialEq)]
17877#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17878#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17879#[cfg_attr(feature = "ts", derive(TS))]
17880#[cfg_attr(feature = "ts", ts(export))]
17881pub struct LOGGING_DATA_ACKED_DATA {
17882    #[doc = "sequence number (can wrap)"]
17883    pub sequence: u16,
17884    #[doc = "system ID of the target"]
17885    pub target_system: u8,
17886    #[doc = "component ID of the target"]
17887    pub target_component: u8,
17888    #[doc = "data length"]
17889    pub length: u8,
17890    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
17891    pub first_message_offset: u8,
17892    #[doc = "logged data"]
17893    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17894    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17895    pub data: [u8; 249],
17896}
17897impl LOGGING_DATA_ACKED_DATA {
17898    pub const ENCODED_LEN: usize = 255usize;
17899    pub const DEFAULT: Self = Self {
17900        sequence: 0_u16,
17901        target_system: 0_u8,
17902        target_component: 0_u8,
17903        length: 0_u8,
17904        first_message_offset: 0_u8,
17905        data: [0_u8; 249usize],
17906    };
17907    #[cfg(feature = "arbitrary")]
17908    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17909        use arbitrary::{Arbitrary, Unstructured};
17910        let mut buf = [0u8; 1024];
17911        rng.fill_bytes(&mut buf);
17912        let mut unstructured = Unstructured::new(&buf);
17913        Self::arbitrary(&mut unstructured).unwrap_or_default()
17914    }
17915}
17916impl Default for LOGGING_DATA_ACKED_DATA {
17917    fn default() -> Self {
17918        Self::DEFAULT.clone()
17919    }
17920}
17921impl MessageData for LOGGING_DATA_ACKED_DATA {
17922    type Message = MavMessage;
17923    const ID: u32 = 267u32;
17924    const NAME: &'static str = "LOGGING_DATA_ACKED";
17925    const EXTRA_CRC: u8 = 35u8;
17926    const ENCODED_LEN: usize = 255usize;
17927    fn deser(
17928        _version: MavlinkVersion,
17929        __input: &[u8],
17930    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17931        let avail_len = __input.len();
17932        let mut payload_buf = [0; Self::ENCODED_LEN];
17933        let mut buf = if avail_len < Self::ENCODED_LEN {
17934            payload_buf[0..avail_len].copy_from_slice(__input);
17935            Bytes::new(&payload_buf)
17936        } else {
17937            Bytes::new(__input)
17938        };
17939        let mut __struct = Self::default();
17940        __struct.sequence = buf.get_u16_le();
17941        __struct.target_system = buf.get_u8();
17942        __struct.target_component = buf.get_u8();
17943        __struct.length = buf.get_u8();
17944        __struct.first_message_offset = buf.get_u8();
17945        for v in &mut __struct.data {
17946            let val = buf.get_u8();
17947            *v = val;
17948        }
17949        Ok(__struct)
17950    }
17951    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17952        let mut __tmp = BytesMut::new(bytes);
17953        #[allow(clippy::absurd_extreme_comparisons)]
17954        #[allow(unused_comparisons)]
17955        if __tmp.remaining() < Self::ENCODED_LEN {
17956            panic!(
17957                "buffer is too small (need {} bytes, but got {})",
17958                Self::ENCODED_LEN,
17959                __tmp.remaining(),
17960            )
17961        }
17962        __tmp.put_u16_le(self.sequence);
17963        __tmp.put_u8(self.target_system);
17964        __tmp.put_u8(self.target_component);
17965        __tmp.put_u8(self.length);
17966        __tmp.put_u8(self.first_message_offset);
17967        for val in &self.data {
17968            __tmp.put_u8(*val);
17969        }
17970        if matches!(version, MavlinkVersion::V2) {
17971            let len = __tmp.len();
17972            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17973        } else {
17974            __tmp.len()
17975        }
17976    }
17977}
17978#[doc = "Reply to LOG_REQUEST_DATA."]
17979#[doc = ""]
17980#[doc = "ID: 120"]
17981#[derive(Debug, Clone, PartialEq)]
17982#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17983#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17984#[cfg_attr(feature = "ts", derive(TS))]
17985#[cfg_attr(feature = "ts", ts(export))]
17986pub struct LOG_DATA_DATA {
17987    #[doc = "Offset into the log"]
17988    pub ofs: u32,
17989    #[doc = "Log id (from LOG_ENTRY reply)"]
17990    pub id: u16,
17991    #[doc = "Number of bytes (zero for end of log)"]
17992    pub count: u8,
17993    #[doc = "log data"]
17994    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17995    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17996    pub data: [u8; 90],
17997}
17998impl LOG_DATA_DATA {
17999    pub const ENCODED_LEN: usize = 97usize;
18000    pub const DEFAULT: Self = Self {
18001        ofs: 0_u32,
18002        id: 0_u16,
18003        count: 0_u8,
18004        data: [0_u8; 90usize],
18005    };
18006    #[cfg(feature = "arbitrary")]
18007    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18008        use arbitrary::{Arbitrary, Unstructured};
18009        let mut buf = [0u8; 1024];
18010        rng.fill_bytes(&mut buf);
18011        let mut unstructured = Unstructured::new(&buf);
18012        Self::arbitrary(&mut unstructured).unwrap_or_default()
18013    }
18014}
18015impl Default for LOG_DATA_DATA {
18016    fn default() -> Self {
18017        Self::DEFAULT.clone()
18018    }
18019}
18020impl MessageData for LOG_DATA_DATA {
18021    type Message = MavMessage;
18022    const ID: u32 = 120u32;
18023    const NAME: &'static str = "LOG_DATA";
18024    const EXTRA_CRC: u8 = 134u8;
18025    const ENCODED_LEN: usize = 97usize;
18026    fn deser(
18027        _version: MavlinkVersion,
18028        __input: &[u8],
18029    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18030        let avail_len = __input.len();
18031        let mut payload_buf = [0; Self::ENCODED_LEN];
18032        let mut buf = if avail_len < Self::ENCODED_LEN {
18033            payload_buf[0..avail_len].copy_from_slice(__input);
18034            Bytes::new(&payload_buf)
18035        } else {
18036            Bytes::new(__input)
18037        };
18038        let mut __struct = Self::default();
18039        __struct.ofs = buf.get_u32_le();
18040        __struct.id = buf.get_u16_le();
18041        __struct.count = buf.get_u8();
18042        for v in &mut __struct.data {
18043            let val = buf.get_u8();
18044            *v = val;
18045        }
18046        Ok(__struct)
18047    }
18048    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18049        let mut __tmp = BytesMut::new(bytes);
18050        #[allow(clippy::absurd_extreme_comparisons)]
18051        #[allow(unused_comparisons)]
18052        if __tmp.remaining() < Self::ENCODED_LEN {
18053            panic!(
18054                "buffer is too small (need {} bytes, but got {})",
18055                Self::ENCODED_LEN,
18056                __tmp.remaining(),
18057            )
18058        }
18059        __tmp.put_u32_le(self.ofs);
18060        __tmp.put_u16_le(self.id);
18061        __tmp.put_u8(self.count);
18062        for val in &self.data {
18063            __tmp.put_u8(*val);
18064        }
18065        if matches!(version, MavlinkVersion::V2) {
18066            let len = __tmp.len();
18067            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18068        } else {
18069            __tmp.len()
18070        }
18071    }
18072}
18073#[doc = "Reply to LOG_REQUEST_LIST."]
18074#[doc = ""]
18075#[doc = "ID: 118"]
18076#[derive(Debug, Clone, PartialEq)]
18077#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18078#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18079#[cfg_attr(feature = "ts", derive(TS))]
18080#[cfg_attr(feature = "ts", ts(export))]
18081pub struct LOG_ENTRY_DATA {
18082    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
18083    pub time_utc: u32,
18084    #[doc = "Size of the log (may be approximate)"]
18085    pub size: u32,
18086    #[doc = "Log id"]
18087    pub id: u16,
18088    #[doc = "Total number of logs"]
18089    pub num_logs: u16,
18090    #[doc = "High log number"]
18091    pub last_log_num: u16,
18092}
18093impl LOG_ENTRY_DATA {
18094    pub const ENCODED_LEN: usize = 14usize;
18095    pub const DEFAULT: Self = Self {
18096        time_utc: 0_u32,
18097        size: 0_u32,
18098        id: 0_u16,
18099        num_logs: 0_u16,
18100        last_log_num: 0_u16,
18101    };
18102    #[cfg(feature = "arbitrary")]
18103    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18104        use arbitrary::{Arbitrary, Unstructured};
18105        let mut buf = [0u8; 1024];
18106        rng.fill_bytes(&mut buf);
18107        let mut unstructured = Unstructured::new(&buf);
18108        Self::arbitrary(&mut unstructured).unwrap_or_default()
18109    }
18110}
18111impl Default for LOG_ENTRY_DATA {
18112    fn default() -> Self {
18113        Self::DEFAULT.clone()
18114    }
18115}
18116impl MessageData for LOG_ENTRY_DATA {
18117    type Message = MavMessage;
18118    const ID: u32 = 118u32;
18119    const NAME: &'static str = "LOG_ENTRY";
18120    const EXTRA_CRC: u8 = 56u8;
18121    const ENCODED_LEN: usize = 14usize;
18122    fn deser(
18123        _version: MavlinkVersion,
18124        __input: &[u8],
18125    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18126        let avail_len = __input.len();
18127        let mut payload_buf = [0; Self::ENCODED_LEN];
18128        let mut buf = if avail_len < Self::ENCODED_LEN {
18129            payload_buf[0..avail_len].copy_from_slice(__input);
18130            Bytes::new(&payload_buf)
18131        } else {
18132            Bytes::new(__input)
18133        };
18134        let mut __struct = Self::default();
18135        __struct.time_utc = buf.get_u32_le();
18136        __struct.size = buf.get_u32_le();
18137        __struct.id = buf.get_u16_le();
18138        __struct.num_logs = buf.get_u16_le();
18139        __struct.last_log_num = buf.get_u16_le();
18140        Ok(__struct)
18141    }
18142    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18143        let mut __tmp = BytesMut::new(bytes);
18144        #[allow(clippy::absurd_extreme_comparisons)]
18145        #[allow(unused_comparisons)]
18146        if __tmp.remaining() < Self::ENCODED_LEN {
18147            panic!(
18148                "buffer is too small (need {} bytes, but got {})",
18149                Self::ENCODED_LEN,
18150                __tmp.remaining(),
18151            )
18152        }
18153        __tmp.put_u32_le(self.time_utc);
18154        __tmp.put_u32_le(self.size);
18155        __tmp.put_u16_le(self.id);
18156        __tmp.put_u16_le(self.num_logs);
18157        __tmp.put_u16_le(self.last_log_num);
18158        if matches!(version, MavlinkVersion::V2) {
18159            let len = __tmp.len();
18160            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18161        } else {
18162            __tmp.len()
18163        }
18164    }
18165}
18166#[doc = "Erase all logs."]
18167#[doc = ""]
18168#[doc = "ID: 121"]
18169#[derive(Debug, Clone, PartialEq)]
18170#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18171#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18172#[cfg_attr(feature = "ts", derive(TS))]
18173#[cfg_attr(feature = "ts", ts(export))]
18174pub struct LOG_ERASE_DATA {
18175    #[doc = "System ID"]
18176    pub target_system: u8,
18177    #[doc = "Component ID"]
18178    pub target_component: u8,
18179}
18180impl LOG_ERASE_DATA {
18181    pub const ENCODED_LEN: usize = 2usize;
18182    pub const DEFAULT: Self = Self {
18183        target_system: 0_u8,
18184        target_component: 0_u8,
18185    };
18186    #[cfg(feature = "arbitrary")]
18187    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18188        use arbitrary::{Arbitrary, Unstructured};
18189        let mut buf = [0u8; 1024];
18190        rng.fill_bytes(&mut buf);
18191        let mut unstructured = Unstructured::new(&buf);
18192        Self::arbitrary(&mut unstructured).unwrap_or_default()
18193    }
18194}
18195impl Default for LOG_ERASE_DATA {
18196    fn default() -> Self {
18197        Self::DEFAULT.clone()
18198    }
18199}
18200impl MessageData for LOG_ERASE_DATA {
18201    type Message = MavMessage;
18202    const ID: u32 = 121u32;
18203    const NAME: &'static str = "LOG_ERASE";
18204    const EXTRA_CRC: u8 = 237u8;
18205    const ENCODED_LEN: usize = 2usize;
18206    fn deser(
18207        _version: MavlinkVersion,
18208        __input: &[u8],
18209    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18210        let avail_len = __input.len();
18211        let mut payload_buf = [0; Self::ENCODED_LEN];
18212        let mut buf = if avail_len < Self::ENCODED_LEN {
18213            payload_buf[0..avail_len].copy_from_slice(__input);
18214            Bytes::new(&payload_buf)
18215        } else {
18216            Bytes::new(__input)
18217        };
18218        let mut __struct = Self::default();
18219        __struct.target_system = buf.get_u8();
18220        __struct.target_component = buf.get_u8();
18221        Ok(__struct)
18222    }
18223    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18224        let mut __tmp = BytesMut::new(bytes);
18225        #[allow(clippy::absurd_extreme_comparisons)]
18226        #[allow(unused_comparisons)]
18227        if __tmp.remaining() < Self::ENCODED_LEN {
18228            panic!(
18229                "buffer is too small (need {} bytes, but got {})",
18230                Self::ENCODED_LEN,
18231                __tmp.remaining(),
18232            )
18233        }
18234        __tmp.put_u8(self.target_system);
18235        __tmp.put_u8(self.target_component);
18236        if matches!(version, MavlinkVersion::V2) {
18237            let len = __tmp.len();
18238            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18239        } else {
18240            __tmp.len()
18241        }
18242    }
18243}
18244#[doc = "Request a chunk of a log."]
18245#[doc = ""]
18246#[doc = "ID: 119"]
18247#[derive(Debug, Clone, PartialEq)]
18248#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18249#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18250#[cfg_attr(feature = "ts", derive(TS))]
18251#[cfg_attr(feature = "ts", ts(export))]
18252pub struct LOG_REQUEST_DATA_DATA {
18253    #[doc = "Offset into the log"]
18254    pub ofs: u32,
18255    #[doc = "Number of bytes"]
18256    pub count: u32,
18257    #[doc = "Log id (from LOG_ENTRY reply)"]
18258    pub id: u16,
18259    #[doc = "System ID"]
18260    pub target_system: u8,
18261    #[doc = "Component ID"]
18262    pub target_component: u8,
18263}
18264impl LOG_REQUEST_DATA_DATA {
18265    pub const ENCODED_LEN: usize = 12usize;
18266    pub const DEFAULT: Self = Self {
18267        ofs: 0_u32,
18268        count: 0_u32,
18269        id: 0_u16,
18270        target_system: 0_u8,
18271        target_component: 0_u8,
18272    };
18273    #[cfg(feature = "arbitrary")]
18274    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18275        use arbitrary::{Arbitrary, Unstructured};
18276        let mut buf = [0u8; 1024];
18277        rng.fill_bytes(&mut buf);
18278        let mut unstructured = Unstructured::new(&buf);
18279        Self::arbitrary(&mut unstructured).unwrap_or_default()
18280    }
18281}
18282impl Default for LOG_REQUEST_DATA_DATA {
18283    fn default() -> Self {
18284        Self::DEFAULT.clone()
18285    }
18286}
18287impl MessageData for LOG_REQUEST_DATA_DATA {
18288    type Message = MavMessage;
18289    const ID: u32 = 119u32;
18290    const NAME: &'static str = "LOG_REQUEST_DATA";
18291    const EXTRA_CRC: u8 = 116u8;
18292    const ENCODED_LEN: usize = 12usize;
18293    fn deser(
18294        _version: MavlinkVersion,
18295        __input: &[u8],
18296    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18297        let avail_len = __input.len();
18298        let mut payload_buf = [0; Self::ENCODED_LEN];
18299        let mut buf = if avail_len < Self::ENCODED_LEN {
18300            payload_buf[0..avail_len].copy_from_slice(__input);
18301            Bytes::new(&payload_buf)
18302        } else {
18303            Bytes::new(__input)
18304        };
18305        let mut __struct = Self::default();
18306        __struct.ofs = buf.get_u32_le();
18307        __struct.count = buf.get_u32_le();
18308        __struct.id = buf.get_u16_le();
18309        __struct.target_system = buf.get_u8();
18310        __struct.target_component = buf.get_u8();
18311        Ok(__struct)
18312    }
18313    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18314        let mut __tmp = BytesMut::new(bytes);
18315        #[allow(clippy::absurd_extreme_comparisons)]
18316        #[allow(unused_comparisons)]
18317        if __tmp.remaining() < Self::ENCODED_LEN {
18318            panic!(
18319                "buffer is too small (need {} bytes, but got {})",
18320                Self::ENCODED_LEN,
18321                __tmp.remaining(),
18322            )
18323        }
18324        __tmp.put_u32_le(self.ofs);
18325        __tmp.put_u32_le(self.count);
18326        __tmp.put_u16_le(self.id);
18327        __tmp.put_u8(self.target_system);
18328        __tmp.put_u8(self.target_component);
18329        if matches!(version, MavlinkVersion::V2) {
18330            let len = __tmp.len();
18331            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18332        } else {
18333            __tmp.len()
18334        }
18335    }
18336}
18337#[doc = "Stop log transfer and resume normal logging."]
18338#[doc = ""]
18339#[doc = "ID: 122"]
18340#[derive(Debug, Clone, PartialEq)]
18341#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18342#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18343#[cfg_attr(feature = "ts", derive(TS))]
18344#[cfg_attr(feature = "ts", ts(export))]
18345pub struct LOG_REQUEST_END_DATA {
18346    #[doc = "System ID"]
18347    pub target_system: u8,
18348    #[doc = "Component ID"]
18349    pub target_component: u8,
18350}
18351impl LOG_REQUEST_END_DATA {
18352    pub const ENCODED_LEN: usize = 2usize;
18353    pub const DEFAULT: Self = Self {
18354        target_system: 0_u8,
18355        target_component: 0_u8,
18356    };
18357    #[cfg(feature = "arbitrary")]
18358    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18359        use arbitrary::{Arbitrary, Unstructured};
18360        let mut buf = [0u8; 1024];
18361        rng.fill_bytes(&mut buf);
18362        let mut unstructured = Unstructured::new(&buf);
18363        Self::arbitrary(&mut unstructured).unwrap_or_default()
18364    }
18365}
18366impl Default for LOG_REQUEST_END_DATA {
18367    fn default() -> Self {
18368        Self::DEFAULT.clone()
18369    }
18370}
18371impl MessageData for LOG_REQUEST_END_DATA {
18372    type Message = MavMessage;
18373    const ID: u32 = 122u32;
18374    const NAME: &'static str = "LOG_REQUEST_END";
18375    const EXTRA_CRC: u8 = 203u8;
18376    const ENCODED_LEN: usize = 2usize;
18377    fn deser(
18378        _version: MavlinkVersion,
18379        __input: &[u8],
18380    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18381        let avail_len = __input.len();
18382        let mut payload_buf = [0; Self::ENCODED_LEN];
18383        let mut buf = if avail_len < Self::ENCODED_LEN {
18384            payload_buf[0..avail_len].copy_from_slice(__input);
18385            Bytes::new(&payload_buf)
18386        } else {
18387            Bytes::new(__input)
18388        };
18389        let mut __struct = Self::default();
18390        __struct.target_system = buf.get_u8();
18391        __struct.target_component = buf.get_u8();
18392        Ok(__struct)
18393    }
18394    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18395        let mut __tmp = BytesMut::new(bytes);
18396        #[allow(clippy::absurd_extreme_comparisons)]
18397        #[allow(unused_comparisons)]
18398        if __tmp.remaining() < Self::ENCODED_LEN {
18399            panic!(
18400                "buffer is too small (need {} bytes, but got {})",
18401                Self::ENCODED_LEN,
18402                __tmp.remaining(),
18403            )
18404        }
18405        __tmp.put_u8(self.target_system);
18406        __tmp.put_u8(self.target_component);
18407        if matches!(version, MavlinkVersion::V2) {
18408            let len = __tmp.len();
18409            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18410        } else {
18411            __tmp.len()
18412        }
18413    }
18414}
18415#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
18416#[doc = ""]
18417#[doc = "ID: 117"]
18418#[derive(Debug, Clone, PartialEq)]
18419#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18420#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18421#[cfg_attr(feature = "ts", derive(TS))]
18422#[cfg_attr(feature = "ts", ts(export))]
18423pub struct LOG_REQUEST_LIST_DATA {
18424    #[doc = "First log id (0 for first available)"]
18425    pub start: u16,
18426    #[doc = "Last log id (0xffff for last available)"]
18427    pub end: u16,
18428    #[doc = "System ID"]
18429    pub target_system: u8,
18430    #[doc = "Component ID"]
18431    pub target_component: u8,
18432}
18433impl LOG_REQUEST_LIST_DATA {
18434    pub const ENCODED_LEN: usize = 6usize;
18435    pub const DEFAULT: Self = Self {
18436        start: 0_u16,
18437        end: 0_u16,
18438        target_system: 0_u8,
18439        target_component: 0_u8,
18440    };
18441    #[cfg(feature = "arbitrary")]
18442    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18443        use arbitrary::{Arbitrary, Unstructured};
18444        let mut buf = [0u8; 1024];
18445        rng.fill_bytes(&mut buf);
18446        let mut unstructured = Unstructured::new(&buf);
18447        Self::arbitrary(&mut unstructured).unwrap_or_default()
18448    }
18449}
18450impl Default for LOG_REQUEST_LIST_DATA {
18451    fn default() -> Self {
18452        Self::DEFAULT.clone()
18453    }
18454}
18455impl MessageData for LOG_REQUEST_LIST_DATA {
18456    type Message = MavMessage;
18457    const ID: u32 = 117u32;
18458    const NAME: &'static str = "LOG_REQUEST_LIST";
18459    const EXTRA_CRC: u8 = 128u8;
18460    const ENCODED_LEN: usize = 6usize;
18461    fn deser(
18462        _version: MavlinkVersion,
18463        __input: &[u8],
18464    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18465        let avail_len = __input.len();
18466        let mut payload_buf = [0; Self::ENCODED_LEN];
18467        let mut buf = if avail_len < Self::ENCODED_LEN {
18468            payload_buf[0..avail_len].copy_from_slice(__input);
18469            Bytes::new(&payload_buf)
18470        } else {
18471            Bytes::new(__input)
18472        };
18473        let mut __struct = Self::default();
18474        __struct.start = buf.get_u16_le();
18475        __struct.end = buf.get_u16_le();
18476        __struct.target_system = buf.get_u8();
18477        __struct.target_component = buf.get_u8();
18478        Ok(__struct)
18479    }
18480    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18481        let mut __tmp = BytesMut::new(bytes);
18482        #[allow(clippy::absurd_extreme_comparisons)]
18483        #[allow(unused_comparisons)]
18484        if __tmp.remaining() < Self::ENCODED_LEN {
18485            panic!(
18486                "buffer is too small (need {} bytes, but got {})",
18487                Self::ENCODED_LEN,
18488                __tmp.remaining(),
18489            )
18490        }
18491        __tmp.put_u16_le(self.start);
18492        __tmp.put_u16_le(self.end);
18493        __tmp.put_u8(self.target_system);
18494        __tmp.put_u8(self.target_component);
18495        if matches!(version, MavlinkVersion::V2) {
18496            let len = __tmp.len();
18497            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18498        } else {
18499            __tmp.len()
18500        }
18501    }
18502}
18503#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
18504#[doc = ""]
18505#[doc = "ID: 192"]
18506#[derive(Debug, Clone, PartialEq)]
18507#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18508#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18509#[cfg_attr(feature = "ts", derive(TS))]
18510#[cfg_attr(feature = "ts", ts(export))]
18511pub struct MAG_CAL_REPORT_DATA {
18512    #[doc = "RMS milligauss residuals."]
18513    pub fitness: f32,
18514    #[doc = "X offset."]
18515    pub ofs_x: f32,
18516    #[doc = "Y offset."]
18517    pub ofs_y: f32,
18518    #[doc = "Z offset."]
18519    pub ofs_z: f32,
18520    #[doc = "X diagonal (matrix 11)."]
18521    pub diag_x: f32,
18522    #[doc = "Y diagonal (matrix 22)."]
18523    pub diag_y: f32,
18524    #[doc = "Z diagonal (matrix 33)."]
18525    pub diag_z: f32,
18526    #[doc = "X off-diagonal (matrix 12 and 21)."]
18527    pub offdiag_x: f32,
18528    #[doc = "Y off-diagonal (matrix 13 and 31)."]
18529    pub offdiag_y: f32,
18530    #[doc = "Z off-diagonal (matrix 32 and 23)."]
18531    pub offdiag_z: f32,
18532    #[doc = "Compass being calibrated."]
18533    pub compass_id: u8,
18534    #[doc = "Bitmask of compasses being calibrated."]
18535    pub cal_mask: u8,
18536    #[doc = "Calibration Status."]
18537    pub cal_status: MagCalStatus,
18538    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
18539    pub autosaved: u8,
18540    #[doc = "Confidence in orientation (higher is better)."]
18541    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18542    pub orientation_confidence: f32,
18543    #[doc = "orientation before calibration."]
18544    #[cfg_attr(feature = "serde", serde(default))]
18545    pub old_orientation: MavSensorOrientation,
18546    #[doc = "orientation after calibration."]
18547    #[cfg_attr(feature = "serde", serde(default))]
18548    pub new_orientation: MavSensorOrientation,
18549    #[doc = "field radius correction factor"]
18550    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18551    pub scale_factor: f32,
18552}
18553impl MAG_CAL_REPORT_DATA {
18554    pub const ENCODED_LEN: usize = 54usize;
18555    pub const DEFAULT: Self = Self {
18556        fitness: 0.0_f32,
18557        ofs_x: 0.0_f32,
18558        ofs_y: 0.0_f32,
18559        ofs_z: 0.0_f32,
18560        diag_x: 0.0_f32,
18561        diag_y: 0.0_f32,
18562        diag_z: 0.0_f32,
18563        offdiag_x: 0.0_f32,
18564        offdiag_y: 0.0_f32,
18565        offdiag_z: 0.0_f32,
18566        compass_id: 0_u8,
18567        cal_mask: 0_u8,
18568        cal_status: MagCalStatus::DEFAULT,
18569        autosaved: 0_u8,
18570        orientation_confidence: 0.0_f32,
18571        old_orientation: MavSensorOrientation::DEFAULT,
18572        new_orientation: MavSensorOrientation::DEFAULT,
18573        scale_factor: 0.0_f32,
18574    };
18575    #[cfg(feature = "arbitrary")]
18576    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18577        use arbitrary::{Arbitrary, Unstructured};
18578        let mut buf = [0u8; 1024];
18579        rng.fill_bytes(&mut buf);
18580        let mut unstructured = Unstructured::new(&buf);
18581        Self::arbitrary(&mut unstructured).unwrap_or_default()
18582    }
18583}
18584impl Default for MAG_CAL_REPORT_DATA {
18585    fn default() -> Self {
18586        Self::DEFAULT.clone()
18587    }
18588}
18589impl MessageData for MAG_CAL_REPORT_DATA {
18590    type Message = MavMessage;
18591    const ID: u32 = 192u32;
18592    const NAME: &'static str = "MAG_CAL_REPORT";
18593    const EXTRA_CRC: u8 = 36u8;
18594    const ENCODED_LEN: usize = 54usize;
18595    fn deser(
18596        _version: MavlinkVersion,
18597        __input: &[u8],
18598    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18599        let avail_len = __input.len();
18600        let mut payload_buf = [0; Self::ENCODED_LEN];
18601        let mut buf = if avail_len < Self::ENCODED_LEN {
18602            payload_buf[0..avail_len].copy_from_slice(__input);
18603            Bytes::new(&payload_buf)
18604        } else {
18605            Bytes::new(__input)
18606        };
18607        let mut __struct = Self::default();
18608        __struct.fitness = buf.get_f32_le();
18609        __struct.ofs_x = buf.get_f32_le();
18610        __struct.ofs_y = buf.get_f32_le();
18611        __struct.ofs_z = buf.get_f32_le();
18612        __struct.diag_x = buf.get_f32_le();
18613        __struct.diag_y = buf.get_f32_le();
18614        __struct.diag_z = buf.get_f32_le();
18615        __struct.offdiag_x = buf.get_f32_le();
18616        __struct.offdiag_y = buf.get_f32_le();
18617        __struct.offdiag_z = buf.get_f32_le();
18618        __struct.compass_id = buf.get_u8();
18619        __struct.cal_mask = buf.get_u8();
18620        let tmp = buf.get_u8();
18621        __struct.cal_status =
18622            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18623                enum_type: "MagCalStatus",
18624                value: tmp as u32,
18625            })?;
18626        __struct.autosaved = buf.get_u8();
18627        __struct.orientation_confidence = buf.get_f32_le();
18628        let tmp = buf.get_u8();
18629        __struct.old_orientation =
18630            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18631                enum_type: "MavSensorOrientation",
18632                value: tmp as u32,
18633            })?;
18634        let tmp = buf.get_u8();
18635        __struct.new_orientation =
18636            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18637                enum_type: "MavSensorOrientation",
18638                value: tmp as u32,
18639            })?;
18640        __struct.scale_factor = buf.get_f32_le();
18641        Ok(__struct)
18642    }
18643    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18644        let mut __tmp = BytesMut::new(bytes);
18645        #[allow(clippy::absurd_extreme_comparisons)]
18646        #[allow(unused_comparisons)]
18647        if __tmp.remaining() < Self::ENCODED_LEN {
18648            panic!(
18649                "buffer is too small (need {} bytes, but got {})",
18650                Self::ENCODED_LEN,
18651                __tmp.remaining(),
18652            )
18653        }
18654        __tmp.put_f32_le(self.fitness);
18655        __tmp.put_f32_le(self.ofs_x);
18656        __tmp.put_f32_le(self.ofs_y);
18657        __tmp.put_f32_le(self.ofs_z);
18658        __tmp.put_f32_le(self.diag_x);
18659        __tmp.put_f32_le(self.diag_y);
18660        __tmp.put_f32_le(self.diag_z);
18661        __tmp.put_f32_le(self.offdiag_x);
18662        __tmp.put_f32_le(self.offdiag_y);
18663        __tmp.put_f32_le(self.offdiag_z);
18664        __tmp.put_u8(self.compass_id);
18665        __tmp.put_u8(self.cal_mask);
18666        __tmp.put_u8(self.cal_status as u8);
18667        __tmp.put_u8(self.autosaved);
18668        if matches!(version, MavlinkVersion::V2) {
18669            __tmp.put_f32_le(self.orientation_confidence);
18670            __tmp.put_u8(self.old_orientation as u8);
18671            __tmp.put_u8(self.new_orientation as u8);
18672            __tmp.put_f32_le(self.scale_factor);
18673            let len = __tmp.len();
18674            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18675        } else {
18676            __tmp.len()
18677        }
18678    }
18679}
18680#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
18681#[doc = ""]
18682#[doc = "ID: 69"]
18683#[derive(Debug, Clone, PartialEq)]
18684#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18685#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18686#[cfg_attr(feature = "ts", derive(TS))]
18687#[cfg_attr(feature = "ts", ts(export))]
18688pub struct MANUAL_CONTROL_DATA {
18689    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
18690    pub x: i16,
18691    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
18692    pub y: i16,
18693    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
18694    pub z: i16,
18695    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
18696    pub r: i16,
18697    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
18698    pub buttons: u16,
18699    #[doc = "The system to be controlled."]
18700    pub target: u8,
18701    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
18702    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18703    pub buttons2: u16,
18704    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
18705    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18706    pub enabled_extensions: u8,
18707    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
18708    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18709    pub s: i16,
18710    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
18711    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18712    pub t: i16,
18713    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
18714    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18715    pub aux1: i16,
18716    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
18717    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18718    pub aux2: i16,
18719    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
18720    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18721    pub aux3: i16,
18722    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
18723    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18724    pub aux4: i16,
18725    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
18726    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18727    pub aux5: i16,
18728    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
18729    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18730    pub aux6: i16,
18731}
18732impl MANUAL_CONTROL_DATA {
18733    pub const ENCODED_LEN: usize = 30usize;
18734    pub const DEFAULT: Self = Self {
18735        x: 0_i16,
18736        y: 0_i16,
18737        z: 0_i16,
18738        r: 0_i16,
18739        buttons: 0_u16,
18740        target: 0_u8,
18741        buttons2: 0_u16,
18742        enabled_extensions: 0_u8,
18743        s: 0_i16,
18744        t: 0_i16,
18745        aux1: 0_i16,
18746        aux2: 0_i16,
18747        aux3: 0_i16,
18748        aux4: 0_i16,
18749        aux5: 0_i16,
18750        aux6: 0_i16,
18751    };
18752    #[cfg(feature = "arbitrary")]
18753    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18754        use arbitrary::{Arbitrary, Unstructured};
18755        let mut buf = [0u8; 1024];
18756        rng.fill_bytes(&mut buf);
18757        let mut unstructured = Unstructured::new(&buf);
18758        Self::arbitrary(&mut unstructured).unwrap_or_default()
18759    }
18760}
18761impl Default for MANUAL_CONTROL_DATA {
18762    fn default() -> Self {
18763        Self::DEFAULT.clone()
18764    }
18765}
18766impl MessageData for MANUAL_CONTROL_DATA {
18767    type Message = MavMessage;
18768    const ID: u32 = 69u32;
18769    const NAME: &'static str = "MANUAL_CONTROL";
18770    const EXTRA_CRC: u8 = 243u8;
18771    const ENCODED_LEN: usize = 30usize;
18772    fn deser(
18773        _version: MavlinkVersion,
18774        __input: &[u8],
18775    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18776        let avail_len = __input.len();
18777        let mut payload_buf = [0; Self::ENCODED_LEN];
18778        let mut buf = if avail_len < Self::ENCODED_LEN {
18779            payload_buf[0..avail_len].copy_from_slice(__input);
18780            Bytes::new(&payload_buf)
18781        } else {
18782            Bytes::new(__input)
18783        };
18784        let mut __struct = Self::default();
18785        __struct.x = buf.get_i16_le();
18786        __struct.y = buf.get_i16_le();
18787        __struct.z = buf.get_i16_le();
18788        __struct.r = buf.get_i16_le();
18789        __struct.buttons = buf.get_u16_le();
18790        __struct.target = buf.get_u8();
18791        __struct.buttons2 = buf.get_u16_le();
18792        __struct.enabled_extensions = buf.get_u8();
18793        __struct.s = buf.get_i16_le();
18794        __struct.t = buf.get_i16_le();
18795        __struct.aux1 = buf.get_i16_le();
18796        __struct.aux2 = buf.get_i16_le();
18797        __struct.aux3 = buf.get_i16_le();
18798        __struct.aux4 = buf.get_i16_le();
18799        __struct.aux5 = buf.get_i16_le();
18800        __struct.aux6 = buf.get_i16_le();
18801        Ok(__struct)
18802    }
18803    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18804        let mut __tmp = BytesMut::new(bytes);
18805        #[allow(clippy::absurd_extreme_comparisons)]
18806        #[allow(unused_comparisons)]
18807        if __tmp.remaining() < Self::ENCODED_LEN {
18808            panic!(
18809                "buffer is too small (need {} bytes, but got {})",
18810                Self::ENCODED_LEN,
18811                __tmp.remaining(),
18812            )
18813        }
18814        __tmp.put_i16_le(self.x);
18815        __tmp.put_i16_le(self.y);
18816        __tmp.put_i16_le(self.z);
18817        __tmp.put_i16_le(self.r);
18818        __tmp.put_u16_le(self.buttons);
18819        __tmp.put_u8(self.target);
18820        if matches!(version, MavlinkVersion::V2) {
18821            __tmp.put_u16_le(self.buttons2);
18822            __tmp.put_u8(self.enabled_extensions);
18823            __tmp.put_i16_le(self.s);
18824            __tmp.put_i16_le(self.t);
18825            __tmp.put_i16_le(self.aux1);
18826            __tmp.put_i16_le(self.aux2);
18827            __tmp.put_i16_le(self.aux3);
18828            __tmp.put_i16_le(self.aux4);
18829            __tmp.put_i16_le(self.aux5);
18830            __tmp.put_i16_le(self.aux6);
18831            let len = __tmp.len();
18832            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18833        } else {
18834            __tmp.len()
18835        }
18836    }
18837}
18838#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
18839#[doc = ""]
18840#[doc = "ID: 81"]
18841#[derive(Debug, Clone, PartialEq)]
18842#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18843#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18844#[cfg_attr(feature = "ts", derive(TS))]
18845#[cfg_attr(feature = "ts", ts(export))]
18846pub struct MANUAL_SETPOINT_DATA {
18847    #[doc = "Timestamp (time since system boot)."]
18848    pub time_boot_ms: u32,
18849    #[doc = "Desired roll rate"]
18850    pub roll: f32,
18851    #[doc = "Desired pitch rate"]
18852    pub pitch: f32,
18853    #[doc = "Desired yaw rate"]
18854    pub yaw: f32,
18855    #[doc = "Collective thrust, normalized to 0 .. 1"]
18856    pub thrust: f32,
18857    #[doc = "Flight mode switch position, 0.. 255"]
18858    pub mode_switch: u8,
18859    #[doc = "Override mode switch position, 0.. 255"]
18860    pub manual_override_switch: u8,
18861}
18862impl MANUAL_SETPOINT_DATA {
18863    pub const ENCODED_LEN: usize = 22usize;
18864    pub const DEFAULT: Self = Self {
18865        time_boot_ms: 0_u32,
18866        roll: 0.0_f32,
18867        pitch: 0.0_f32,
18868        yaw: 0.0_f32,
18869        thrust: 0.0_f32,
18870        mode_switch: 0_u8,
18871        manual_override_switch: 0_u8,
18872    };
18873    #[cfg(feature = "arbitrary")]
18874    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18875        use arbitrary::{Arbitrary, Unstructured};
18876        let mut buf = [0u8; 1024];
18877        rng.fill_bytes(&mut buf);
18878        let mut unstructured = Unstructured::new(&buf);
18879        Self::arbitrary(&mut unstructured).unwrap_or_default()
18880    }
18881}
18882impl Default for MANUAL_SETPOINT_DATA {
18883    fn default() -> Self {
18884        Self::DEFAULT.clone()
18885    }
18886}
18887impl MessageData for MANUAL_SETPOINT_DATA {
18888    type Message = MavMessage;
18889    const ID: u32 = 81u32;
18890    const NAME: &'static str = "MANUAL_SETPOINT";
18891    const EXTRA_CRC: u8 = 106u8;
18892    const ENCODED_LEN: usize = 22usize;
18893    fn deser(
18894        _version: MavlinkVersion,
18895        __input: &[u8],
18896    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18897        let avail_len = __input.len();
18898        let mut payload_buf = [0; Self::ENCODED_LEN];
18899        let mut buf = if avail_len < Self::ENCODED_LEN {
18900            payload_buf[0..avail_len].copy_from_slice(__input);
18901            Bytes::new(&payload_buf)
18902        } else {
18903            Bytes::new(__input)
18904        };
18905        let mut __struct = Self::default();
18906        __struct.time_boot_ms = buf.get_u32_le();
18907        __struct.roll = buf.get_f32_le();
18908        __struct.pitch = buf.get_f32_le();
18909        __struct.yaw = buf.get_f32_le();
18910        __struct.thrust = buf.get_f32_le();
18911        __struct.mode_switch = buf.get_u8();
18912        __struct.manual_override_switch = buf.get_u8();
18913        Ok(__struct)
18914    }
18915    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18916        let mut __tmp = BytesMut::new(bytes);
18917        #[allow(clippy::absurd_extreme_comparisons)]
18918        #[allow(unused_comparisons)]
18919        if __tmp.remaining() < Self::ENCODED_LEN {
18920            panic!(
18921                "buffer is too small (need {} bytes, but got {})",
18922                Self::ENCODED_LEN,
18923                __tmp.remaining(),
18924            )
18925        }
18926        __tmp.put_u32_le(self.time_boot_ms);
18927        __tmp.put_f32_le(self.roll);
18928        __tmp.put_f32_le(self.pitch);
18929        __tmp.put_f32_le(self.yaw);
18930        __tmp.put_f32_le(self.thrust);
18931        __tmp.put_u8(self.mode_switch);
18932        __tmp.put_u8(self.manual_override_switch);
18933        if matches!(version, MavlinkVersion::V2) {
18934            let len = __tmp.len();
18935            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18936        } else {
18937            __tmp.len()
18938        }
18939    }
18940}
18941#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
18942#[doc = ""]
18943#[doc = "ID: 249"]
18944#[derive(Debug, Clone, PartialEq)]
18945#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18946#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18947#[cfg_attr(feature = "ts", derive(TS))]
18948#[cfg_attr(feature = "ts", ts(export))]
18949pub struct MEMORY_VECT_DATA {
18950    #[doc = "Starting address of the debug variables"]
18951    pub address: u16,
18952    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
18953    pub ver: u8,
18954    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
18955    pub mavtype: u8,
18956    #[doc = "Memory contents at specified address"]
18957    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18958    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18959    pub value: [i8; 32],
18960}
18961impl MEMORY_VECT_DATA {
18962    pub const ENCODED_LEN: usize = 36usize;
18963    pub const DEFAULT: Self = Self {
18964        address: 0_u16,
18965        ver: 0_u8,
18966        mavtype: 0_u8,
18967        value: [0_i8; 32usize],
18968    };
18969    #[cfg(feature = "arbitrary")]
18970    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18971        use arbitrary::{Arbitrary, Unstructured};
18972        let mut buf = [0u8; 1024];
18973        rng.fill_bytes(&mut buf);
18974        let mut unstructured = Unstructured::new(&buf);
18975        Self::arbitrary(&mut unstructured).unwrap_or_default()
18976    }
18977}
18978impl Default for MEMORY_VECT_DATA {
18979    fn default() -> Self {
18980        Self::DEFAULT.clone()
18981    }
18982}
18983impl MessageData for MEMORY_VECT_DATA {
18984    type Message = MavMessage;
18985    const ID: u32 = 249u32;
18986    const NAME: &'static str = "MEMORY_VECT";
18987    const EXTRA_CRC: u8 = 204u8;
18988    const ENCODED_LEN: usize = 36usize;
18989    fn deser(
18990        _version: MavlinkVersion,
18991        __input: &[u8],
18992    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18993        let avail_len = __input.len();
18994        let mut payload_buf = [0; Self::ENCODED_LEN];
18995        let mut buf = if avail_len < Self::ENCODED_LEN {
18996            payload_buf[0..avail_len].copy_from_slice(__input);
18997            Bytes::new(&payload_buf)
18998        } else {
18999            Bytes::new(__input)
19000        };
19001        let mut __struct = Self::default();
19002        __struct.address = buf.get_u16_le();
19003        __struct.ver = buf.get_u8();
19004        __struct.mavtype = buf.get_u8();
19005        for v in &mut __struct.value {
19006            let val = buf.get_i8();
19007            *v = val;
19008        }
19009        Ok(__struct)
19010    }
19011    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19012        let mut __tmp = BytesMut::new(bytes);
19013        #[allow(clippy::absurd_extreme_comparisons)]
19014        #[allow(unused_comparisons)]
19015        if __tmp.remaining() < Self::ENCODED_LEN {
19016            panic!(
19017                "buffer is too small (need {} bytes, but got {})",
19018                Self::ENCODED_LEN,
19019                __tmp.remaining(),
19020            )
19021        }
19022        __tmp.put_u16_le(self.address);
19023        __tmp.put_u8(self.ver);
19024        __tmp.put_u8(self.mavtype);
19025        for val in &self.value {
19026            __tmp.put_i8(*val);
19027        }
19028        if matches!(version, MavlinkVersion::V2) {
19029            let len = __tmp.len();
19030            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19031        } else {
19032            __tmp.len()
19033        }
19034    }
19035}
19036#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
19037#[doc = ""]
19038#[doc = "ID: 244"]
19039#[derive(Debug, Clone, PartialEq)]
19040#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19041#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19042#[cfg_attr(feature = "ts", derive(TS))]
19043#[cfg_attr(feature = "ts", ts(export))]
19044pub struct MESSAGE_INTERVAL_DATA {
19045    #[doc = "0 indicates the interval at which it is sent."]
19046    pub interval_us: i32,
19047    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
19048    pub message_id: u16,
19049}
19050impl MESSAGE_INTERVAL_DATA {
19051    pub const ENCODED_LEN: usize = 6usize;
19052    pub const DEFAULT: Self = Self {
19053        interval_us: 0_i32,
19054        message_id: 0_u16,
19055    };
19056    #[cfg(feature = "arbitrary")]
19057    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19058        use arbitrary::{Arbitrary, Unstructured};
19059        let mut buf = [0u8; 1024];
19060        rng.fill_bytes(&mut buf);
19061        let mut unstructured = Unstructured::new(&buf);
19062        Self::arbitrary(&mut unstructured).unwrap_or_default()
19063    }
19064}
19065impl Default for MESSAGE_INTERVAL_DATA {
19066    fn default() -> Self {
19067        Self::DEFAULT.clone()
19068    }
19069}
19070impl MessageData for MESSAGE_INTERVAL_DATA {
19071    type Message = MavMessage;
19072    const ID: u32 = 244u32;
19073    const NAME: &'static str = "MESSAGE_INTERVAL";
19074    const EXTRA_CRC: u8 = 95u8;
19075    const ENCODED_LEN: usize = 6usize;
19076    fn deser(
19077        _version: MavlinkVersion,
19078        __input: &[u8],
19079    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19080        let avail_len = __input.len();
19081        let mut payload_buf = [0; Self::ENCODED_LEN];
19082        let mut buf = if avail_len < Self::ENCODED_LEN {
19083            payload_buf[0..avail_len].copy_from_slice(__input);
19084            Bytes::new(&payload_buf)
19085        } else {
19086            Bytes::new(__input)
19087        };
19088        let mut __struct = Self::default();
19089        __struct.interval_us = buf.get_i32_le();
19090        __struct.message_id = buf.get_u16_le();
19091        Ok(__struct)
19092    }
19093    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19094        let mut __tmp = BytesMut::new(bytes);
19095        #[allow(clippy::absurd_extreme_comparisons)]
19096        #[allow(unused_comparisons)]
19097        if __tmp.remaining() < Self::ENCODED_LEN {
19098            panic!(
19099                "buffer is too small (need {} bytes, but got {})",
19100                Self::ENCODED_LEN,
19101                __tmp.remaining(),
19102            )
19103        }
19104        __tmp.put_i32_le(self.interval_us);
19105        __tmp.put_u16_le(self.message_id);
19106        if matches!(version, MavlinkVersion::V2) {
19107            let len = __tmp.len();
19108            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19109        } else {
19110            __tmp.len()
19111        }
19112    }
19113}
19114#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
19115#[doc = ""]
19116#[doc = "ID: 47"]
19117#[derive(Debug, Clone, PartialEq)]
19118#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19119#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19120#[cfg_attr(feature = "ts", derive(TS))]
19121#[cfg_attr(feature = "ts", ts(export))]
19122pub struct MISSION_ACK_DATA {
19123    #[doc = "System ID"]
19124    pub target_system: u8,
19125    #[doc = "Component ID"]
19126    pub target_component: u8,
19127    #[doc = "Mission result."]
19128    pub mavtype: MavMissionResult,
19129    #[doc = "Mission type."]
19130    #[cfg_attr(feature = "serde", serde(default))]
19131    pub mission_type: MavMissionType,
19132    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
19133    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19134    pub opaque_id: u32,
19135}
19136impl MISSION_ACK_DATA {
19137    pub const ENCODED_LEN: usize = 8usize;
19138    pub const DEFAULT: Self = Self {
19139        target_system: 0_u8,
19140        target_component: 0_u8,
19141        mavtype: MavMissionResult::DEFAULT,
19142        mission_type: MavMissionType::DEFAULT,
19143        opaque_id: 0_u32,
19144    };
19145    #[cfg(feature = "arbitrary")]
19146    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19147        use arbitrary::{Arbitrary, Unstructured};
19148        let mut buf = [0u8; 1024];
19149        rng.fill_bytes(&mut buf);
19150        let mut unstructured = Unstructured::new(&buf);
19151        Self::arbitrary(&mut unstructured).unwrap_or_default()
19152    }
19153}
19154impl Default for MISSION_ACK_DATA {
19155    fn default() -> Self {
19156        Self::DEFAULT.clone()
19157    }
19158}
19159impl MessageData for MISSION_ACK_DATA {
19160    type Message = MavMessage;
19161    const ID: u32 = 47u32;
19162    const NAME: &'static str = "MISSION_ACK";
19163    const EXTRA_CRC: u8 = 153u8;
19164    const ENCODED_LEN: usize = 8usize;
19165    fn deser(
19166        _version: MavlinkVersion,
19167        __input: &[u8],
19168    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19169        let avail_len = __input.len();
19170        let mut payload_buf = [0; Self::ENCODED_LEN];
19171        let mut buf = if avail_len < Self::ENCODED_LEN {
19172            payload_buf[0..avail_len].copy_from_slice(__input);
19173            Bytes::new(&payload_buf)
19174        } else {
19175            Bytes::new(__input)
19176        };
19177        let mut __struct = Self::default();
19178        __struct.target_system = buf.get_u8();
19179        __struct.target_component = buf.get_u8();
19180        let tmp = buf.get_u8();
19181        __struct.mavtype =
19182            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19183                enum_type: "MavMissionResult",
19184                value: tmp as u32,
19185            })?;
19186        let tmp = buf.get_u8();
19187        __struct.mission_type =
19188            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19189                enum_type: "MavMissionType",
19190                value: tmp as u32,
19191            })?;
19192        __struct.opaque_id = buf.get_u32_le();
19193        Ok(__struct)
19194    }
19195    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19196        let mut __tmp = BytesMut::new(bytes);
19197        #[allow(clippy::absurd_extreme_comparisons)]
19198        #[allow(unused_comparisons)]
19199        if __tmp.remaining() < Self::ENCODED_LEN {
19200            panic!(
19201                "buffer is too small (need {} bytes, but got {})",
19202                Self::ENCODED_LEN,
19203                __tmp.remaining(),
19204            )
19205        }
19206        __tmp.put_u8(self.target_system);
19207        __tmp.put_u8(self.target_component);
19208        __tmp.put_u8(self.mavtype as u8);
19209        if matches!(version, MavlinkVersion::V2) {
19210            __tmp.put_u8(self.mission_type as u8);
19211            __tmp.put_u32_le(self.opaque_id);
19212            let len = __tmp.len();
19213            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19214        } else {
19215            __tmp.len()
19216        }
19217    }
19218}
19219#[doc = "Delete all mission items at once."]
19220#[doc = ""]
19221#[doc = "ID: 45"]
19222#[derive(Debug, Clone, PartialEq)]
19223#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19224#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19225#[cfg_attr(feature = "ts", derive(TS))]
19226#[cfg_attr(feature = "ts", ts(export))]
19227pub struct MISSION_CLEAR_ALL_DATA {
19228    #[doc = "System ID"]
19229    pub target_system: u8,
19230    #[doc = "Component ID"]
19231    pub target_component: u8,
19232    #[doc = "Mission type."]
19233    #[cfg_attr(feature = "serde", serde(default))]
19234    pub mission_type: MavMissionType,
19235}
19236impl MISSION_CLEAR_ALL_DATA {
19237    pub const ENCODED_LEN: usize = 3usize;
19238    pub const DEFAULT: Self = Self {
19239        target_system: 0_u8,
19240        target_component: 0_u8,
19241        mission_type: MavMissionType::DEFAULT,
19242    };
19243    #[cfg(feature = "arbitrary")]
19244    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19245        use arbitrary::{Arbitrary, Unstructured};
19246        let mut buf = [0u8; 1024];
19247        rng.fill_bytes(&mut buf);
19248        let mut unstructured = Unstructured::new(&buf);
19249        Self::arbitrary(&mut unstructured).unwrap_or_default()
19250    }
19251}
19252impl Default for MISSION_CLEAR_ALL_DATA {
19253    fn default() -> Self {
19254        Self::DEFAULT.clone()
19255    }
19256}
19257impl MessageData for MISSION_CLEAR_ALL_DATA {
19258    type Message = MavMessage;
19259    const ID: u32 = 45u32;
19260    const NAME: &'static str = "MISSION_CLEAR_ALL";
19261    const EXTRA_CRC: u8 = 232u8;
19262    const ENCODED_LEN: usize = 3usize;
19263    fn deser(
19264        _version: MavlinkVersion,
19265        __input: &[u8],
19266    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19267        let avail_len = __input.len();
19268        let mut payload_buf = [0; Self::ENCODED_LEN];
19269        let mut buf = if avail_len < Self::ENCODED_LEN {
19270            payload_buf[0..avail_len].copy_from_slice(__input);
19271            Bytes::new(&payload_buf)
19272        } else {
19273            Bytes::new(__input)
19274        };
19275        let mut __struct = Self::default();
19276        __struct.target_system = buf.get_u8();
19277        __struct.target_component = buf.get_u8();
19278        let tmp = buf.get_u8();
19279        __struct.mission_type =
19280            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19281                enum_type: "MavMissionType",
19282                value: tmp as u32,
19283            })?;
19284        Ok(__struct)
19285    }
19286    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19287        let mut __tmp = BytesMut::new(bytes);
19288        #[allow(clippy::absurd_extreme_comparisons)]
19289        #[allow(unused_comparisons)]
19290        if __tmp.remaining() < Self::ENCODED_LEN {
19291            panic!(
19292                "buffer is too small (need {} bytes, but got {})",
19293                Self::ENCODED_LEN,
19294                __tmp.remaining(),
19295            )
19296        }
19297        __tmp.put_u8(self.target_system);
19298        __tmp.put_u8(self.target_component);
19299        if matches!(version, MavlinkVersion::V2) {
19300            __tmp.put_u8(self.mission_type as u8);
19301            let len = __tmp.len();
19302            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19303        } else {
19304            __tmp.len()
19305        }
19306    }
19307}
19308#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
19309#[doc = ""]
19310#[doc = "ID: 44"]
19311#[derive(Debug, Clone, PartialEq)]
19312#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19314#[cfg_attr(feature = "ts", derive(TS))]
19315#[cfg_attr(feature = "ts", ts(export))]
19316pub struct MISSION_COUNT_DATA {
19317    #[doc = "Number of mission items in the sequence"]
19318    pub count: u16,
19319    #[doc = "System ID"]
19320    pub target_system: u8,
19321    #[doc = "Component ID"]
19322    pub target_component: u8,
19323    #[doc = "Mission type."]
19324    #[cfg_attr(feature = "serde", serde(default))]
19325    pub mission_type: MavMissionType,
19326    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
19327    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19328    pub opaque_id: u32,
19329}
19330impl MISSION_COUNT_DATA {
19331    pub const ENCODED_LEN: usize = 9usize;
19332    pub const DEFAULT: Self = Self {
19333        count: 0_u16,
19334        target_system: 0_u8,
19335        target_component: 0_u8,
19336        mission_type: MavMissionType::DEFAULT,
19337        opaque_id: 0_u32,
19338    };
19339    #[cfg(feature = "arbitrary")]
19340    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19341        use arbitrary::{Arbitrary, Unstructured};
19342        let mut buf = [0u8; 1024];
19343        rng.fill_bytes(&mut buf);
19344        let mut unstructured = Unstructured::new(&buf);
19345        Self::arbitrary(&mut unstructured).unwrap_or_default()
19346    }
19347}
19348impl Default for MISSION_COUNT_DATA {
19349    fn default() -> Self {
19350        Self::DEFAULT.clone()
19351    }
19352}
19353impl MessageData for MISSION_COUNT_DATA {
19354    type Message = MavMessage;
19355    const ID: u32 = 44u32;
19356    const NAME: &'static str = "MISSION_COUNT";
19357    const EXTRA_CRC: u8 = 221u8;
19358    const ENCODED_LEN: usize = 9usize;
19359    fn deser(
19360        _version: MavlinkVersion,
19361        __input: &[u8],
19362    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19363        let avail_len = __input.len();
19364        let mut payload_buf = [0; Self::ENCODED_LEN];
19365        let mut buf = if avail_len < Self::ENCODED_LEN {
19366            payload_buf[0..avail_len].copy_from_slice(__input);
19367            Bytes::new(&payload_buf)
19368        } else {
19369            Bytes::new(__input)
19370        };
19371        let mut __struct = Self::default();
19372        __struct.count = buf.get_u16_le();
19373        __struct.target_system = buf.get_u8();
19374        __struct.target_component = buf.get_u8();
19375        let tmp = buf.get_u8();
19376        __struct.mission_type =
19377            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19378                enum_type: "MavMissionType",
19379                value: tmp as u32,
19380            })?;
19381        __struct.opaque_id = buf.get_u32_le();
19382        Ok(__struct)
19383    }
19384    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19385        let mut __tmp = BytesMut::new(bytes);
19386        #[allow(clippy::absurd_extreme_comparisons)]
19387        #[allow(unused_comparisons)]
19388        if __tmp.remaining() < Self::ENCODED_LEN {
19389            panic!(
19390                "buffer is too small (need {} bytes, but got {})",
19391                Self::ENCODED_LEN,
19392                __tmp.remaining(),
19393            )
19394        }
19395        __tmp.put_u16_le(self.count);
19396        __tmp.put_u8(self.target_system);
19397        __tmp.put_u8(self.target_component);
19398        if matches!(version, MavlinkVersion::V2) {
19399            __tmp.put_u8(self.mission_type as u8);
19400            __tmp.put_u32_le(self.opaque_id);
19401            let len = __tmp.len();
19402            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19403        } else {
19404            __tmp.len()
19405        }
19406    }
19407}
19408#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
19409#[doc = ""]
19410#[doc = "ID: 42"]
19411#[derive(Debug, Clone, PartialEq)]
19412#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19413#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19414#[cfg_attr(feature = "ts", derive(TS))]
19415#[cfg_attr(feature = "ts", ts(export))]
19416pub struct MISSION_CURRENT_DATA {
19417    #[doc = "Sequence"]
19418    pub seq: u16,
19419    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
19420    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19421    pub total: u16,
19422    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
19423    #[cfg_attr(feature = "serde", serde(default))]
19424    pub mission_state: MissionState,
19425    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
19426    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19427    pub mission_mode: u8,
19428    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
19429    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19430    pub mission_id: u32,
19431    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
19432    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19433    pub fence_id: u32,
19434    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
19435    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19436    pub rally_points_id: u32,
19437}
19438impl MISSION_CURRENT_DATA {
19439    pub const ENCODED_LEN: usize = 18usize;
19440    pub const DEFAULT: Self = Self {
19441        seq: 0_u16,
19442        total: 0_u16,
19443        mission_state: MissionState::DEFAULT,
19444        mission_mode: 0_u8,
19445        mission_id: 0_u32,
19446        fence_id: 0_u32,
19447        rally_points_id: 0_u32,
19448    };
19449    #[cfg(feature = "arbitrary")]
19450    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19451        use arbitrary::{Arbitrary, Unstructured};
19452        let mut buf = [0u8; 1024];
19453        rng.fill_bytes(&mut buf);
19454        let mut unstructured = Unstructured::new(&buf);
19455        Self::arbitrary(&mut unstructured).unwrap_or_default()
19456    }
19457}
19458impl Default for MISSION_CURRENT_DATA {
19459    fn default() -> Self {
19460        Self::DEFAULT.clone()
19461    }
19462}
19463impl MessageData for MISSION_CURRENT_DATA {
19464    type Message = MavMessage;
19465    const ID: u32 = 42u32;
19466    const NAME: &'static str = "MISSION_CURRENT";
19467    const EXTRA_CRC: u8 = 28u8;
19468    const ENCODED_LEN: usize = 18usize;
19469    fn deser(
19470        _version: MavlinkVersion,
19471        __input: &[u8],
19472    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19473        let avail_len = __input.len();
19474        let mut payload_buf = [0; Self::ENCODED_LEN];
19475        let mut buf = if avail_len < Self::ENCODED_LEN {
19476            payload_buf[0..avail_len].copy_from_slice(__input);
19477            Bytes::new(&payload_buf)
19478        } else {
19479            Bytes::new(__input)
19480        };
19481        let mut __struct = Self::default();
19482        __struct.seq = buf.get_u16_le();
19483        __struct.total = buf.get_u16_le();
19484        let tmp = buf.get_u8();
19485        __struct.mission_state =
19486            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19487                enum_type: "MissionState",
19488                value: tmp as u32,
19489            })?;
19490        __struct.mission_mode = buf.get_u8();
19491        __struct.mission_id = buf.get_u32_le();
19492        __struct.fence_id = buf.get_u32_le();
19493        __struct.rally_points_id = buf.get_u32_le();
19494        Ok(__struct)
19495    }
19496    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19497        let mut __tmp = BytesMut::new(bytes);
19498        #[allow(clippy::absurd_extreme_comparisons)]
19499        #[allow(unused_comparisons)]
19500        if __tmp.remaining() < Self::ENCODED_LEN {
19501            panic!(
19502                "buffer is too small (need {} bytes, but got {})",
19503                Self::ENCODED_LEN,
19504                __tmp.remaining(),
19505            )
19506        }
19507        __tmp.put_u16_le(self.seq);
19508        if matches!(version, MavlinkVersion::V2) {
19509            __tmp.put_u16_le(self.total);
19510            __tmp.put_u8(self.mission_state as u8);
19511            __tmp.put_u8(self.mission_mode);
19512            __tmp.put_u32_le(self.mission_id);
19513            __tmp.put_u32_le(self.fence_id);
19514            __tmp.put_u32_le(self.rally_points_id);
19515            let len = __tmp.len();
19516            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19517        } else {
19518            __tmp.len()
19519        }
19520    }
19521}
19522#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
19523#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19524#[doc = ""]
19525#[doc = "ID: 39"]
19526#[derive(Debug, Clone, PartialEq)]
19527#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19528#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19529#[cfg_attr(feature = "ts", derive(TS))]
19530#[cfg_attr(feature = "ts", ts(export))]
19531pub struct MISSION_ITEM_DATA {
19532    #[doc = "PARAM1, see MAV_CMD enum"]
19533    pub param1: f32,
19534    #[doc = "PARAM2, see MAV_CMD enum"]
19535    pub param2: f32,
19536    #[doc = "PARAM3, see MAV_CMD enum"]
19537    pub param3: f32,
19538    #[doc = "PARAM4, see MAV_CMD enum"]
19539    pub param4: f32,
19540    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
19541    pub x: f32,
19542    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
19543    pub y: f32,
19544    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
19545    pub z: f32,
19546    #[doc = "Sequence"]
19547    pub seq: u16,
19548    #[doc = "The scheduled action for the waypoint."]
19549    pub command: MavCmd,
19550    #[doc = "System ID"]
19551    pub target_system: u8,
19552    #[doc = "Component ID"]
19553    pub target_component: u8,
19554    #[doc = "The coordinate system of the waypoint."]
19555    pub frame: MavFrame,
19556    #[doc = "false:0, true:1"]
19557    pub current: u8,
19558    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19559    pub autocontinue: u8,
19560    #[doc = "Mission type."]
19561    #[cfg_attr(feature = "serde", serde(default))]
19562    pub mission_type: MavMissionType,
19563}
19564impl MISSION_ITEM_DATA {
19565    pub const ENCODED_LEN: usize = 38usize;
19566    pub const DEFAULT: Self = Self {
19567        param1: 0.0_f32,
19568        param2: 0.0_f32,
19569        param3: 0.0_f32,
19570        param4: 0.0_f32,
19571        x: 0.0_f32,
19572        y: 0.0_f32,
19573        z: 0.0_f32,
19574        seq: 0_u16,
19575        command: MavCmd::DEFAULT,
19576        target_system: 0_u8,
19577        target_component: 0_u8,
19578        frame: MavFrame::DEFAULT,
19579        current: 0_u8,
19580        autocontinue: 0_u8,
19581        mission_type: MavMissionType::DEFAULT,
19582    };
19583    #[cfg(feature = "arbitrary")]
19584    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19585        use arbitrary::{Arbitrary, Unstructured};
19586        let mut buf = [0u8; 1024];
19587        rng.fill_bytes(&mut buf);
19588        let mut unstructured = Unstructured::new(&buf);
19589        Self::arbitrary(&mut unstructured).unwrap_or_default()
19590    }
19591}
19592impl Default for MISSION_ITEM_DATA {
19593    fn default() -> Self {
19594        Self::DEFAULT.clone()
19595    }
19596}
19597impl MessageData for MISSION_ITEM_DATA {
19598    type Message = MavMessage;
19599    const ID: u32 = 39u32;
19600    const NAME: &'static str = "MISSION_ITEM";
19601    const EXTRA_CRC: u8 = 254u8;
19602    const ENCODED_LEN: usize = 38usize;
19603    fn deser(
19604        _version: MavlinkVersion,
19605        __input: &[u8],
19606    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19607        let avail_len = __input.len();
19608        let mut payload_buf = [0; Self::ENCODED_LEN];
19609        let mut buf = if avail_len < Self::ENCODED_LEN {
19610            payload_buf[0..avail_len].copy_from_slice(__input);
19611            Bytes::new(&payload_buf)
19612        } else {
19613            Bytes::new(__input)
19614        };
19615        let mut __struct = Self::default();
19616        __struct.param1 = buf.get_f32_le();
19617        __struct.param2 = buf.get_f32_le();
19618        __struct.param3 = buf.get_f32_le();
19619        __struct.param4 = buf.get_f32_le();
19620        __struct.x = buf.get_f32_le();
19621        __struct.y = buf.get_f32_le();
19622        __struct.z = buf.get_f32_le();
19623        __struct.seq = buf.get_u16_le();
19624        let tmp = buf.get_u16_le();
19625        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19626            ::mavlink_core::error::ParserError::InvalidEnum {
19627                enum_type: "MavCmd",
19628                value: tmp as u32,
19629            },
19630        )?;
19631        __struct.target_system = buf.get_u8();
19632        __struct.target_component = buf.get_u8();
19633        let tmp = buf.get_u8();
19634        __struct.frame =
19635            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19636                enum_type: "MavFrame",
19637                value: tmp as u32,
19638            })?;
19639        __struct.current = buf.get_u8();
19640        __struct.autocontinue = buf.get_u8();
19641        let tmp = buf.get_u8();
19642        __struct.mission_type =
19643            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19644                enum_type: "MavMissionType",
19645                value: tmp as u32,
19646            })?;
19647        Ok(__struct)
19648    }
19649    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19650        let mut __tmp = BytesMut::new(bytes);
19651        #[allow(clippy::absurd_extreme_comparisons)]
19652        #[allow(unused_comparisons)]
19653        if __tmp.remaining() < Self::ENCODED_LEN {
19654            panic!(
19655                "buffer is too small (need {} bytes, but got {})",
19656                Self::ENCODED_LEN,
19657                __tmp.remaining(),
19658            )
19659        }
19660        __tmp.put_f32_le(self.param1);
19661        __tmp.put_f32_le(self.param2);
19662        __tmp.put_f32_le(self.param3);
19663        __tmp.put_f32_le(self.param4);
19664        __tmp.put_f32_le(self.x);
19665        __tmp.put_f32_le(self.y);
19666        __tmp.put_f32_le(self.z);
19667        __tmp.put_u16_le(self.seq);
19668        __tmp.put_u16_le(self.command as u16);
19669        __tmp.put_u8(self.target_system);
19670        __tmp.put_u8(self.target_component);
19671        __tmp.put_u8(self.frame as u8);
19672        __tmp.put_u8(self.current);
19673        __tmp.put_u8(self.autocontinue);
19674        if matches!(version, MavlinkVersion::V2) {
19675            __tmp.put_u8(self.mission_type as u8);
19676            let len = __tmp.len();
19677            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19678        } else {
19679            __tmp.len()
19680        }
19681    }
19682}
19683#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19684#[doc = ""]
19685#[doc = "ID: 73"]
19686#[derive(Debug, Clone, PartialEq)]
19687#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19688#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19689#[cfg_attr(feature = "ts", derive(TS))]
19690#[cfg_attr(feature = "ts", ts(export))]
19691pub struct MISSION_ITEM_INT_DATA {
19692    #[doc = "PARAM1, see MAV_CMD enum"]
19693    pub param1: f32,
19694    #[doc = "PARAM2, see MAV_CMD enum"]
19695    pub param2: f32,
19696    #[doc = "PARAM3, see MAV_CMD enum"]
19697    pub param3: f32,
19698    #[doc = "PARAM4, see MAV_CMD enum"]
19699    pub param4: f32,
19700    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
19701    pub x: i32,
19702    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
19703    pub y: i32,
19704    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
19705    pub z: f32,
19706    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
19707    pub seq: u16,
19708    #[doc = "The scheduled action for the waypoint."]
19709    pub command: MavCmd,
19710    #[doc = "System ID"]
19711    pub target_system: u8,
19712    #[doc = "Component ID"]
19713    pub target_component: u8,
19714    #[doc = "The coordinate system of the waypoint."]
19715    pub frame: MavFrame,
19716    #[doc = "false:0, true:1"]
19717    pub current: u8,
19718    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19719    pub autocontinue: u8,
19720    #[doc = "Mission type."]
19721    #[cfg_attr(feature = "serde", serde(default))]
19722    pub mission_type: MavMissionType,
19723}
19724impl MISSION_ITEM_INT_DATA {
19725    pub const ENCODED_LEN: usize = 38usize;
19726    pub const DEFAULT: Self = Self {
19727        param1: 0.0_f32,
19728        param2: 0.0_f32,
19729        param3: 0.0_f32,
19730        param4: 0.0_f32,
19731        x: 0_i32,
19732        y: 0_i32,
19733        z: 0.0_f32,
19734        seq: 0_u16,
19735        command: MavCmd::DEFAULT,
19736        target_system: 0_u8,
19737        target_component: 0_u8,
19738        frame: MavFrame::DEFAULT,
19739        current: 0_u8,
19740        autocontinue: 0_u8,
19741        mission_type: MavMissionType::DEFAULT,
19742    };
19743    #[cfg(feature = "arbitrary")]
19744    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19745        use arbitrary::{Arbitrary, Unstructured};
19746        let mut buf = [0u8; 1024];
19747        rng.fill_bytes(&mut buf);
19748        let mut unstructured = Unstructured::new(&buf);
19749        Self::arbitrary(&mut unstructured).unwrap_or_default()
19750    }
19751}
19752impl Default for MISSION_ITEM_INT_DATA {
19753    fn default() -> Self {
19754        Self::DEFAULT.clone()
19755    }
19756}
19757impl MessageData for MISSION_ITEM_INT_DATA {
19758    type Message = MavMessage;
19759    const ID: u32 = 73u32;
19760    const NAME: &'static str = "MISSION_ITEM_INT";
19761    const EXTRA_CRC: u8 = 38u8;
19762    const ENCODED_LEN: usize = 38usize;
19763    fn deser(
19764        _version: MavlinkVersion,
19765        __input: &[u8],
19766    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19767        let avail_len = __input.len();
19768        let mut payload_buf = [0; Self::ENCODED_LEN];
19769        let mut buf = if avail_len < Self::ENCODED_LEN {
19770            payload_buf[0..avail_len].copy_from_slice(__input);
19771            Bytes::new(&payload_buf)
19772        } else {
19773            Bytes::new(__input)
19774        };
19775        let mut __struct = Self::default();
19776        __struct.param1 = buf.get_f32_le();
19777        __struct.param2 = buf.get_f32_le();
19778        __struct.param3 = buf.get_f32_le();
19779        __struct.param4 = buf.get_f32_le();
19780        __struct.x = buf.get_i32_le();
19781        __struct.y = buf.get_i32_le();
19782        __struct.z = buf.get_f32_le();
19783        __struct.seq = buf.get_u16_le();
19784        let tmp = buf.get_u16_le();
19785        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19786            ::mavlink_core::error::ParserError::InvalidEnum {
19787                enum_type: "MavCmd",
19788                value: tmp as u32,
19789            },
19790        )?;
19791        __struct.target_system = buf.get_u8();
19792        __struct.target_component = buf.get_u8();
19793        let tmp = buf.get_u8();
19794        __struct.frame =
19795            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19796                enum_type: "MavFrame",
19797                value: tmp as u32,
19798            })?;
19799        __struct.current = buf.get_u8();
19800        __struct.autocontinue = buf.get_u8();
19801        let tmp = buf.get_u8();
19802        __struct.mission_type =
19803            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19804                enum_type: "MavMissionType",
19805                value: tmp as u32,
19806            })?;
19807        Ok(__struct)
19808    }
19809    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19810        let mut __tmp = BytesMut::new(bytes);
19811        #[allow(clippy::absurd_extreme_comparisons)]
19812        #[allow(unused_comparisons)]
19813        if __tmp.remaining() < Self::ENCODED_LEN {
19814            panic!(
19815                "buffer is too small (need {} bytes, but got {})",
19816                Self::ENCODED_LEN,
19817                __tmp.remaining(),
19818            )
19819        }
19820        __tmp.put_f32_le(self.param1);
19821        __tmp.put_f32_le(self.param2);
19822        __tmp.put_f32_le(self.param3);
19823        __tmp.put_f32_le(self.param4);
19824        __tmp.put_i32_le(self.x);
19825        __tmp.put_i32_le(self.y);
19826        __tmp.put_f32_le(self.z);
19827        __tmp.put_u16_le(self.seq);
19828        __tmp.put_u16_le(self.command as u16);
19829        __tmp.put_u8(self.target_system);
19830        __tmp.put_u8(self.target_component);
19831        __tmp.put_u8(self.frame as u8);
19832        __tmp.put_u8(self.current);
19833        __tmp.put_u8(self.autocontinue);
19834        if matches!(version, MavlinkVersion::V2) {
19835            __tmp.put_u8(self.mission_type as u8);
19836            let len = __tmp.len();
19837            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19838        } else {
19839            __tmp.len()
19840        }
19841    }
19842}
19843#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
19844#[doc = ""]
19845#[doc = "ID: 46"]
19846#[derive(Debug, Clone, PartialEq)]
19847#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19849#[cfg_attr(feature = "ts", derive(TS))]
19850#[cfg_attr(feature = "ts", ts(export))]
19851pub struct MISSION_ITEM_REACHED_DATA {
19852    #[doc = "Sequence"]
19853    pub seq: u16,
19854}
19855impl MISSION_ITEM_REACHED_DATA {
19856    pub const ENCODED_LEN: usize = 2usize;
19857    pub const DEFAULT: Self = Self { seq: 0_u16 };
19858    #[cfg(feature = "arbitrary")]
19859    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19860        use arbitrary::{Arbitrary, Unstructured};
19861        let mut buf = [0u8; 1024];
19862        rng.fill_bytes(&mut buf);
19863        let mut unstructured = Unstructured::new(&buf);
19864        Self::arbitrary(&mut unstructured).unwrap_or_default()
19865    }
19866}
19867impl Default for MISSION_ITEM_REACHED_DATA {
19868    fn default() -> Self {
19869        Self::DEFAULT.clone()
19870    }
19871}
19872impl MessageData for MISSION_ITEM_REACHED_DATA {
19873    type Message = MavMessage;
19874    const ID: u32 = 46u32;
19875    const NAME: &'static str = "MISSION_ITEM_REACHED";
19876    const EXTRA_CRC: u8 = 11u8;
19877    const ENCODED_LEN: usize = 2usize;
19878    fn deser(
19879        _version: MavlinkVersion,
19880        __input: &[u8],
19881    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19882        let avail_len = __input.len();
19883        let mut payload_buf = [0; Self::ENCODED_LEN];
19884        let mut buf = if avail_len < Self::ENCODED_LEN {
19885            payload_buf[0..avail_len].copy_from_slice(__input);
19886            Bytes::new(&payload_buf)
19887        } else {
19888            Bytes::new(__input)
19889        };
19890        let mut __struct = Self::default();
19891        __struct.seq = buf.get_u16_le();
19892        Ok(__struct)
19893    }
19894    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19895        let mut __tmp = BytesMut::new(bytes);
19896        #[allow(clippy::absurd_extreme_comparisons)]
19897        #[allow(unused_comparisons)]
19898        if __tmp.remaining() < Self::ENCODED_LEN {
19899            panic!(
19900                "buffer is too small (need {} bytes, but got {})",
19901                Self::ENCODED_LEN,
19902                __tmp.remaining(),
19903            )
19904        }
19905        __tmp.put_u16_le(self.seq);
19906        if matches!(version, MavlinkVersion::V2) {
19907            let len = __tmp.len();
19908            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19909        } else {
19910            __tmp.len()
19911        }
19912    }
19913}
19914#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
19915#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
19916#[doc = ""]
19917#[doc = "ID: 40"]
19918#[derive(Debug, Clone, PartialEq)]
19919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19920#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19921#[cfg_attr(feature = "ts", derive(TS))]
19922#[cfg_attr(feature = "ts", ts(export))]
19923pub struct MISSION_REQUEST_DATA {
19924    #[doc = "Sequence"]
19925    pub seq: u16,
19926    #[doc = "System ID"]
19927    pub target_system: u8,
19928    #[doc = "Component ID"]
19929    pub target_component: u8,
19930    #[doc = "Mission type."]
19931    #[cfg_attr(feature = "serde", serde(default))]
19932    pub mission_type: MavMissionType,
19933}
19934impl MISSION_REQUEST_DATA {
19935    pub const ENCODED_LEN: usize = 5usize;
19936    pub const DEFAULT: Self = Self {
19937        seq: 0_u16,
19938        target_system: 0_u8,
19939        target_component: 0_u8,
19940        mission_type: MavMissionType::DEFAULT,
19941    };
19942    #[cfg(feature = "arbitrary")]
19943    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19944        use arbitrary::{Arbitrary, Unstructured};
19945        let mut buf = [0u8; 1024];
19946        rng.fill_bytes(&mut buf);
19947        let mut unstructured = Unstructured::new(&buf);
19948        Self::arbitrary(&mut unstructured).unwrap_or_default()
19949    }
19950}
19951impl Default for MISSION_REQUEST_DATA {
19952    fn default() -> Self {
19953        Self::DEFAULT.clone()
19954    }
19955}
19956impl MessageData for MISSION_REQUEST_DATA {
19957    type Message = MavMessage;
19958    const ID: u32 = 40u32;
19959    const NAME: &'static str = "MISSION_REQUEST";
19960    const EXTRA_CRC: u8 = 230u8;
19961    const ENCODED_LEN: usize = 5usize;
19962    fn deser(
19963        _version: MavlinkVersion,
19964        __input: &[u8],
19965    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19966        let avail_len = __input.len();
19967        let mut payload_buf = [0; Self::ENCODED_LEN];
19968        let mut buf = if avail_len < Self::ENCODED_LEN {
19969            payload_buf[0..avail_len].copy_from_slice(__input);
19970            Bytes::new(&payload_buf)
19971        } else {
19972            Bytes::new(__input)
19973        };
19974        let mut __struct = Self::default();
19975        __struct.seq = buf.get_u16_le();
19976        __struct.target_system = buf.get_u8();
19977        __struct.target_component = buf.get_u8();
19978        let tmp = buf.get_u8();
19979        __struct.mission_type =
19980            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19981                enum_type: "MavMissionType",
19982                value: tmp as u32,
19983            })?;
19984        Ok(__struct)
19985    }
19986    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19987        let mut __tmp = BytesMut::new(bytes);
19988        #[allow(clippy::absurd_extreme_comparisons)]
19989        #[allow(unused_comparisons)]
19990        if __tmp.remaining() < Self::ENCODED_LEN {
19991            panic!(
19992                "buffer is too small (need {} bytes, but got {})",
19993                Self::ENCODED_LEN,
19994                __tmp.remaining(),
19995            )
19996        }
19997        __tmp.put_u16_le(self.seq);
19998        __tmp.put_u8(self.target_system);
19999        __tmp.put_u8(self.target_component);
20000        if matches!(version, MavlinkVersion::V2) {
20001            __tmp.put_u8(self.mission_type as u8);
20002            let len = __tmp.len();
20003            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20004        } else {
20005            __tmp.len()
20006        }
20007    }
20008}
20009#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20010#[doc = ""]
20011#[doc = "ID: 51"]
20012#[derive(Debug, Clone, PartialEq)]
20013#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20014#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20015#[cfg_attr(feature = "ts", derive(TS))]
20016#[cfg_attr(feature = "ts", ts(export))]
20017pub struct MISSION_REQUEST_INT_DATA {
20018    #[doc = "Sequence"]
20019    pub seq: u16,
20020    #[doc = "System ID"]
20021    pub target_system: u8,
20022    #[doc = "Component ID"]
20023    pub target_component: u8,
20024    #[doc = "Mission type."]
20025    #[cfg_attr(feature = "serde", serde(default))]
20026    pub mission_type: MavMissionType,
20027}
20028impl MISSION_REQUEST_INT_DATA {
20029    pub const ENCODED_LEN: usize = 5usize;
20030    pub const DEFAULT: Self = Self {
20031        seq: 0_u16,
20032        target_system: 0_u8,
20033        target_component: 0_u8,
20034        mission_type: MavMissionType::DEFAULT,
20035    };
20036    #[cfg(feature = "arbitrary")]
20037    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20038        use arbitrary::{Arbitrary, Unstructured};
20039        let mut buf = [0u8; 1024];
20040        rng.fill_bytes(&mut buf);
20041        let mut unstructured = Unstructured::new(&buf);
20042        Self::arbitrary(&mut unstructured).unwrap_or_default()
20043    }
20044}
20045impl Default for MISSION_REQUEST_INT_DATA {
20046    fn default() -> Self {
20047        Self::DEFAULT.clone()
20048    }
20049}
20050impl MessageData for MISSION_REQUEST_INT_DATA {
20051    type Message = MavMessage;
20052    const ID: u32 = 51u32;
20053    const NAME: &'static str = "MISSION_REQUEST_INT";
20054    const EXTRA_CRC: u8 = 196u8;
20055    const ENCODED_LEN: usize = 5usize;
20056    fn deser(
20057        _version: MavlinkVersion,
20058        __input: &[u8],
20059    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20060        let avail_len = __input.len();
20061        let mut payload_buf = [0; Self::ENCODED_LEN];
20062        let mut buf = if avail_len < Self::ENCODED_LEN {
20063            payload_buf[0..avail_len].copy_from_slice(__input);
20064            Bytes::new(&payload_buf)
20065        } else {
20066            Bytes::new(__input)
20067        };
20068        let mut __struct = Self::default();
20069        __struct.seq = buf.get_u16_le();
20070        __struct.target_system = buf.get_u8();
20071        __struct.target_component = buf.get_u8();
20072        let tmp = buf.get_u8();
20073        __struct.mission_type =
20074            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20075                enum_type: "MavMissionType",
20076                value: tmp as u32,
20077            })?;
20078        Ok(__struct)
20079    }
20080    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20081        let mut __tmp = BytesMut::new(bytes);
20082        #[allow(clippy::absurd_extreme_comparisons)]
20083        #[allow(unused_comparisons)]
20084        if __tmp.remaining() < Self::ENCODED_LEN {
20085            panic!(
20086                "buffer is too small (need {} bytes, but got {})",
20087                Self::ENCODED_LEN,
20088                __tmp.remaining(),
20089            )
20090        }
20091        __tmp.put_u16_le(self.seq);
20092        __tmp.put_u8(self.target_system);
20093        __tmp.put_u8(self.target_component);
20094        if matches!(version, MavlinkVersion::V2) {
20095            __tmp.put_u8(self.mission_type as u8);
20096            let len = __tmp.len();
20097            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20098        } else {
20099            __tmp.len()
20100        }
20101    }
20102}
20103#[doc = "Request the overall list of mission items from the system/component."]
20104#[doc = ""]
20105#[doc = "ID: 43"]
20106#[derive(Debug, Clone, PartialEq)]
20107#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20108#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20109#[cfg_attr(feature = "ts", derive(TS))]
20110#[cfg_attr(feature = "ts", ts(export))]
20111pub struct MISSION_REQUEST_LIST_DATA {
20112    #[doc = "System ID"]
20113    pub target_system: u8,
20114    #[doc = "Component ID"]
20115    pub target_component: u8,
20116    #[doc = "Mission type."]
20117    #[cfg_attr(feature = "serde", serde(default))]
20118    pub mission_type: MavMissionType,
20119}
20120impl MISSION_REQUEST_LIST_DATA {
20121    pub const ENCODED_LEN: usize = 3usize;
20122    pub const DEFAULT: Self = Self {
20123        target_system: 0_u8,
20124        target_component: 0_u8,
20125        mission_type: MavMissionType::DEFAULT,
20126    };
20127    #[cfg(feature = "arbitrary")]
20128    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20129        use arbitrary::{Arbitrary, Unstructured};
20130        let mut buf = [0u8; 1024];
20131        rng.fill_bytes(&mut buf);
20132        let mut unstructured = Unstructured::new(&buf);
20133        Self::arbitrary(&mut unstructured).unwrap_or_default()
20134    }
20135}
20136impl Default for MISSION_REQUEST_LIST_DATA {
20137    fn default() -> Self {
20138        Self::DEFAULT.clone()
20139    }
20140}
20141impl MessageData for MISSION_REQUEST_LIST_DATA {
20142    type Message = MavMessage;
20143    const ID: u32 = 43u32;
20144    const NAME: &'static str = "MISSION_REQUEST_LIST";
20145    const EXTRA_CRC: u8 = 132u8;
20146    const ENCODED_LEN: usize = 3usize;
20147    fn deser(
20148        _version: MavlinkVersion,
20149        __input: &[u8],
20150    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20151        let avail_len = __input.len();
20152        let mut payload_buf = [0; Self::ENCODED_LEN];
20153        let mut buf = if avail_len < Self::ENCODED_LEN {
20154            payload_buf[0..avail_len].copy_from_slice(__input);
20155            Bytes::new(&payload_buf)
20156        } else {
20157            Bytes::new(__input)
20158        };
20159        let mut __struct = Self::default();
20160        __struct.target_system = buf.get_u8();
20161        __struct.target_component = buf.get_u8();
20162        let tmp = buf.get_u8();
20163        __struct.mission_type =
20164            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20165                enum_type: "MavMissionType",
20166                value: tmp as u32,
20167            })?;
20168        Ok(__struct)
20169    }
20170    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20171        let mut __tmp = BytesMut::new(bytes);
20172        #[allow(clippy::absurd_extreme_comparisons)]
20173        #[allow(unused_comparisons)]
20174        if __tmp.remaining() < Self::ENCODED_LEN {
20175            panic!(
20176                "buffer is too small (need {} bytes, but got {})",
20177                Self::ENCODED_LEN,
20178                __tmp.remaining(),
20179            )
20180        }
20181        __tmp.put_u8(self.target_system);
20182        __tmp.put_u8(self.target_component);
20183        if matches!(version, MavlinkVersion::V2) {
20184            __tmp.put_u8(self.mission_type as u8);
20185            let len = __tmp.len();
20186            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20187        } else {
20188            __tmp.len()
20189        }
20190    }
20191}
20192#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
20193#[doc = ""]
20194#[doc = "ID: 37"]
20195#[derive(Debug, Clone, PartialEq)]
20196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20197#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20198#[cfg_attr(feature = "ts", derive(TS))]
20199#[cfg_attr(feature = "ts", ts(export))]
20200pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
20201    #[doc = "Start index"]
20202    pub start_index: i16,
20203    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
20204    pub end_index: i16,
20205    #[doc = "System ID"]
20206    pub target_system: u8,
20207    #[doc = "Component ID"]
20208    pub target_component: u8,
20209    #[doc = "Mission type."]
20210    #[cfg_attr(feature = "serde", serde(default))]
20211    pub mission_type: MavMissionType,
20212}
20213impl MISSION_REQUEST_PARTIAL_LIST_DATA {
20214    pub const ENCODED_LEN: usize = 7usize;
20215    pub const DEFAULT: Self = Self {
20216        start_index: 0_i16,
20217        end_index: 0_i16,
20218        target_system: 0_u8,
20219        target_component: 0_u8,
20220        mission_type: MavMissionType::DEFAULT,
20221    };
20222    #[cfg(feature = "arbitrary")]
20223    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20224        use arbitrary::{Arbitrary, Unstructured};
20225        let mut buf = [0u8; 1024];
20226        rng.fill_bytes(&mut buf);
20227        let mut unstructured = Unstructured::new(&buf);
20228        Self::arbitrary(&mut unstructured).unwrap_or_default()
20229    }
20230}
20231impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
20232    fn default() -> Self {
20233        Self::DEFAULT.clone()
20234    }
20235}
20236impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
20237    type Message = MavMessage;
20238    const ID: u32 = 37u32;
20239    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
20240    const EXTRA_CRC: u8 = 212u8;
20241    const ENCODED_LEN: usize = 7usize;
20242    fn deser(
20243        _version: MavlinkVersion,
20244        __input: &[u8],
20245    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20246        let avail_len = __input.len();
20247        let mut payload_buf = [0; Self::ENCODED_LEN];
20248        let mut buf = if avail_len < Self::ENCODED_LEN {
20249            payload_buf[0..avail_len].copy_from_slice(__input);
20250            Bytes::new(&payload_buf)
20251        } else {
20252            Bytes::new(__input)
20253        };
20254        let mut __struct = Self::default();
20255        __struct.start_index = buf.get_i16_le();
20256        __struct.end_index = buf.get_i16_le();
20257        __struct.target_system = buf.get_u8();
20258        __struct.target_component = buf.get_u8();
20259        let tmp = buf.get_u8();
20260        __struct.mission_type =
20261            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20262                enum_type: "MavMissionType",
20263                value: tmp as u32,
20264            })?;
20265        Ok(__struct)
20266    }
20267    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20268        let mut __tmp = BytesMut::new(bytes);
20269        #[allow(clippy::absurd_extreme_comparisons)]
20270        #[allow(unused_comparisons)]
20271        if __tmp.remaining() < Self::ENCODED_LEN {
20272            panic!(
20273                "buffer is too small (need {} bytes, but got {})",
20274                Self::ENCODED_LEN,
20275                __tmp.remaining(),
20276            )
20277        }
20278        __tmp.put_i16_le(self.start_index);
20279        __tmp.put_i16_le(self.end_index);
20280        __tmp.put_u8(self.target_system);
20281        __tmp.put_u8(self.target_component);
20282        if matches!(version, MavlinkVersion::V2) {
20283            __tmp.put_u8(self.mission_type as u8);
20284            let len = __tmp.len();
20285            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20286        } else {
20287            __tmp.len()
20288        }
20289    }
20290}
20291#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
20292#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
20293#[doc = ""]
20294#[doc = "ID: 41"]
20295#[derive(Debug, Clone, PartialEq)]
20296#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20297#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20298#[cfg_attr(feature = "ts", derive(TS))]
20299#[cfg_attr(feature = "ts", ts(export))]
20300pub struct MISSION_SET_CURRENT_DATA {
20301    #[doc = "Sequence"]
20302    pub seq: u16,
20303    #[doc = "System ID"]
20304    pub target_system: u8,
20305    #[doc = "Component ID"]
20306    pub target_component: u8,
20307}
20308impl MISSION_SET_CURRENT_DATA {
20309    pub const ENCODED_LEN: usize = 4usize;
20310    pub const DEFAULT: Self = Self {
20311        seq: 0_u16,
20312        target_system: 0_u8,
20313        target_component: 0_u8,
20314    };
20315    #[cfg(feature = "arbitrary")]
20316    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20317        use arbitrary::{Arbitrary, Unstructured};
20318        let mut buf = [0u8; 1024];
20319        rng.fill_bytes(&mut buf);
20320        let mut unstructured = Unstructured::new(&buf);
20321        Self::arbitrary(&mut unstructured).unwrap_or_default()
20322    }
20323}
20324impl Default for MISSION_SET_CURRENT_DATA {
20325    fn default() -> Self {
20326        Self::DEFAULT.clone()
20327    }
20328}
20329impl MessageData for MISSION_SET_CURRENT_DATA {
20330    type Message = MavMessage;
20331    const ID: u32 = 41u32;
20332    const NAME: &'static str = "MISSION_SET_CURRENT";
20333    const EXTRA_CRC: u8 = 28u8;
20334    const ENCODED_LEN: usize = 4usize;
20335    fn deser(
20336        _version: MavlinkVersion,
20337        __input: &[u8],
20338    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20339        let avail_len = __input.len();
20340        let mut payload_buf = [0; Self::ENCODED_LEN];
20341        let mut buf = if avail_len < Self::ENCODED_LEN {
20342            payload_buf[0..avail_len].copy_from_slice(__input);
20343            Bytes::new(&payload_buf)
20344        } else {
20345            Bytes::new(__input)
20346        };
20347        let mut __struct = Self::default();
20348        __struct.seq = buf.get_u16_le();
20349        __struct.target_system = buf.get_u8();
20350        __struct.target_component = buf.get_u8();
20351        Ok(__struct)
20352    }
20353    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20354        let mut __tmp = BytesMut::new(bytes);
20355        #[allow(clippy::absurd_extreme_comparisons)]
20356        #[allow(unused_comparisons)]
20357        if __tmp.remaining() < Self::ENCODED_LEN {
20358            panic!(
20359                "buffer is too small (need {} bytes, but got {})",
20360                Self::ENCODED_LEN,
20361                __tmp.remaining(),
20362            )
20363        }
20364        __tmp.put_u16_le(self.seq);
20365        __tmp.put_u8(self.target_system);
20366        __tmp.put_u8(self.target_component);
20367        if matches!(version, MavlinkVersion::V2) {
20368            let len = __tmp.len();
20369            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20370        } else {
20371            __tmp.len()
20372        }
20373    }
20374}
20375#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
20376#[doc = ""]
20377#[doc = "ID: 38"]
20378#[derive(Debug, Clone, PartialEq)]
20379#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20380#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20381#[cfg_attr(feature = "ts", derive(TS))]
20382#[cfg_attr(feature = "ts", ts(export))]
20383pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
20384    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
20385    pub start_index: i16,
20386    #[doc = "End index, equal or greater than start index."]
20387    pub end_index: i16,
20388    #[doc = "System ID"]
20389    pub target_system: u8,
20390    #[doc = "Component ID"]
20391    pub target_component: u8,
20392    #[doc = "Mission type."]
20393    #[cfg_attr(feature = "serde", serde(default))]
20394    pub mission_type: MavMissionType,
20395}
20396impl MISSION_WRITE_PARTIAL_LIST_DATA {
20397    pub const ENCODED_LEN: usize = 7usize;
20398    pub const DEFAULT: Self = Self {
20399        start_index: 0_i16,
20400        end_index: 0_i16,
20401        target_system: 0_u8,
20402        target_component: 0_u8,
20403        mission_type: MavMissionType::DEFAULT,
20404    };
20405    #[cfg(feature = "arbitrary")]
20406    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20407        use arbitrary::{Arbitrary, Unstructured};
20408        let mut buf = [0u8; 1024];
20409        rng.fill_bytes(&mut buf);
20410        let mut unstructured = Unstructured::new(&buf);
20411        Self::arbitrary(&mut unstructured).unwrap_or_default()
20412    }
20413}
20414impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
20415    fn default() -> Self {
20416        Self::DEFAULT.clone()
20417    }
20418}
20419impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
20420    type Message = MavMessage;
20421    const ID: u32 = 38u32;
20422    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
20423    const EXTRA_CRC: u8 = 9u8;
20424    const ENCODED_LEN: usize = 7usize;
20425    fn deser(
20426        _version: MavlinkVersion,
20427        __input: &[u8],
20428    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20429        let avail_len = __input.len();
20430        let mut payload_buf = [0; Self::ENCODED_LEN];
20431        let mut buf = if avail_len < Self::ENCODED_LEN {
20432            payload_buf[0..avail_len].copy_from_slice(__input);
20433            Bytes::new(&payload_buf)
20434        } else {
20435            Bytes::new(__input)
20436        };
20437        let mut __struct = Self::default();
20438        __struct.start_index = buf.get_i16_le();
20439        __struct.end_index = buf.get_i16_le();
20440        __struct.target_system = buf.get_u8();
20441        __struct.target_component = buf.get_u8();
20442        let tmp = buf.get_u8();
20443        __struct.mission_type =
20444            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20445                enum_type: "MavMissionType",
20446                value: tmp as u32,
20447            })?;
20448        Ok(__struct)
20449    }
20450    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20451        let mut __tmp = BytesMut::new(bytes);
20452        #[allow(clippy::absurd_extreme_comparisons)]
20453        #[allow(unused_comparisons)]
20454        if __tmp.remaining() < Self::ENCODED_LEN {
20455            panic!(
20456                "buffer is too small (need {} bytes, but got {})",
20457                Self::ENCODED_LEN,
20458                __tmp.remaining(),
20459            )
20460        }
20461        __tmp.put_i16_le(self.start_index);
20462        __tmp.put_i16_le(self.end_index);
20463        __tmp.put_u8(self.target_system);
20464        __tmp.put_u8(self.target_component);
20465        if matches!(version, MavlinkVersion::V2) {
20466            __tmp.put_u8(self.mission_type as u8);
20467            let len = __tmp.len();
20468            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20469        } else {
20470            __tmp.len()
20471        }
20472    }
20473}
20474#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
20475#[doc = "Orientation of a mount."]
20476#[doc = ""]
20477#[doc = "ID: 265"]
20478#[derive(Debug, Clone, PartialEq)]
20479#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20480#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20481#[cfg_attr(feature = "ts", derive(TS))]
20482#[cfg_attr(feature = "ts", ts(export))]
20483pub struct MOUNT_ORIENTATION_DATA {
20484    #[doc = "Timestamp (time since system boot)."]
20485    pub time_boot_ms: u32,
20486    #[doc = "Roll in global frame (set to NaN for invalid)."]
20487    pub roll: f32,
20488    #[doc = "Pitch in global frame (set to NaN for invalid)."]
20489    pub pitch: f32,
20490    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
20491    pub yaw: f32,
20492    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
20493    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20494    pub yaw_absolute: f32,
20495}
20496impl MOUNT_ORIENTATION_DATA {
20497    pub const ENCODED_LEN: usize = 20usize;
20498    pub const DEFAULT: Self = Self {
20499        time_boot_ms: 0_u32,
20500        roll: 0.0_f32,
20501        pitch: 0.0_f32,
20502        yaw: 0.0_f32,
20503        yaw_absolute: 0.0_f32,
20504    };
20505    #[cfg(feature = "arbitrary")]
20506    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20507        use arbitrary::{Arbitrary, Unstructured};
20508        let mut buf = [0u8; 1024];
20509        rng.fill_bytes(&mut buf);
20510        let mut unstructured = Unstructured::new(&buf);
20511        Self::arbitrary(&mut unstructured).unwrap_or_default()
20512    }
20513}
20514impl Default for MOUNT_ORIENTATION_DATA {
20515    fn default() -> Self {
20516        Self::DEFAULT.clone()
20517    }
20518}
20519impl MessageData for MOUNT_ORIENTATION_DATA {
20520    type Message = MavMessage;
20521    const ID: u32 = 265u32;
20522    const NAME: &'static str = "MOUNT_ORIENTATION";
20523    const EXTRA_CRC: u8 = 26u8;
20524    const ENCODED_LEN: usize = 20usize;
20525    fn deser(
20526        _version: MavlinkVersion,
20527        __input: &[u8],
20528    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20529        let avail_len = __input.len();
20530        let mut payload_buf = [0; Self::ENCODED_LEN];
20531        let mut buf = if avail_len < Self::ENCODED_LEN {
20532            payload_buf[0..avail_len].copy_from_slice(__input);
20533            Bytes::new(&payload_buf)
20534        } else {
20535            Bytes::new(__input)
20536        };
20537        let mut __struct = Self::default();
20538        __struct.time_boot_ms = buf.get_u32_le();
20539        __struct.roll = buf.get_f32_le();
20540        __struct.pitch = buf.get_f32_le();
20541        __struct.yaw = buf.get_f32_le();
20542        __struct.yaw_absolute = buf.get_f32_le();
20543        Ok(__struct)
20544    }
20545    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20546        let mut __tmp = BytesMut::new(bytes);
20547        #[allow(clippy::absurd_extreme_comparisons)]
20548        #[allow(unused_comparisons)]
20549        if __tmp.remaining() < Self::ENCODED_LEN {
20550            panic!(
20551                "buffer is too small (need {} bytes, but got {})",
20552                Self::ENCODED_LEN,
20553                __tmp.remaining(),
20554            )
20555        }
20556        __tmp.put_u32_le(self.time_boot_ms);
20557        __tmp.put_f32_le(self.roll);
20558        __tmp.put_f32_le(self.pitch);
20559        __tmp.put_f32_le(self.yaw);
20560        if matches!(version, MavlinkVersion::V2) {
20561            __tmp.put_f32_le(self.yaw_absolute);
20562            let len = __tmp.len();
20563            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20564        } else {
20565            __tmp.len()
20566        }
20567    }
20568}
20569#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20570#[doc = ""]
20571#[doc = "ID: 251"]
20572#[derive(Debug, Clone, PartialEq)]
20573#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20574#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20575#[cfg_attr(feature = "ts", derive(TS))]
20576#[cfg_attr(feature = "ts", ts(export))]
20577pub struct NAMED_VALUE_FLOAT_DATA {
20578    #[doc = "Timestamp (time since system boot)."]
20579    pub time_boot_ms: u32,
20580    #[doc = "Floating point value"]
20581    pub value: f32,
20582    #[doc = "Name of the debug variable"]
20583    #[cfg_attr(feature = "ts", ts(type = "string"))]
20584    pub name: CharArray<10>,
20585}
20586impl NAMED_VALUE_FLOAT_DATA {
20587    pub const ENCODED_LEN: usize = 18usize;
20588    pub const DEFAULT: Self = Self {
20589        time_boot_ms: 0_u32,
20590        value: 0.0_f32,
20591        name: CharArray::new([0_u8; 10usize]),
20592    };
20593    #[cfg(feature = "arbitrary")]
20594    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20595        use arbitrary::{Arbitrary, Unstructured};
20596        let mut buf = [0u8; 1024];
20597        rng.fill_bytes(&mut buf);
20598        let mut unstructured = Unstructured::new(&buf);
20599        Self::arbitrary(&mut unstructured).unwrap_or_default()
20600    }
20601}
20602impl Default for NAMED_VALUE_FLOAT_DATA {
20603    fn default() -> Self {
20604        Self::DEFAULT.clone()
20605    }
20606}
20607impl MessageData for NAMED_VALUE_FLOAT_DATA {
20608    type Message = MavMessage;
20609    const ID: u32 = 251u32;
20610    const NAME: &'static str = "NAMED_VALUE_FLOAT";
20611    const EXTRA_CRC: u8 = 170u8;
20612    const ENCODED_LEN: usize = 18usize;
20613    fn deser(
20614        _version: MavlinkVersion,
20615        __input: &[u8],
20616    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20617        let avail_len = __input.len();
20618        let mut payload_buf = [0; Self::ENCODED_LEN];
20619        let mut buf = if avail_len < Self::ENCODED_LEN {
20620            payload_buf[0..avail_len].copy_from_slice(__input);
20621            Bytes::new(&payload_buf)
20622        } else {
20623            Bytes::new(__input)
20624        };
20625        let mut __struct = Self::default();
20626        __struct.time_boot_ms = buf.get_u32_le();
20627        __struct.value = buf.get_f32_le();
20628        let mut tmp = [0_u8; 10usize];
20629        for v in &mut tmp {
20630            *v = buf.get_u8();
20631        }
20632        __struct.name = CharArray::new(tmp);
20633        Ok(__struct)
20634    }
20635    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20636        let mut __tmp = BytesMut::new(bytes);
20637        #[allow(clippy::absurd_extreme_comparisons)]
20638        #[allow(unused_comparisons)]
20639        if __tmp.remaining() < Self::ENCODED_LEN {
20640            panic!(
20641                "buffer is too small (need {} bytes, but got {})",
20642                Self::ENCODED_LEN,
20643                __tmp.remaining(),
20644            )
20645        }
20646        __tmp.put_u32_le(self.time_boot_ms);
20647        __tmp.put_f32_le(self.value);
20648        for val in &self.name {
20649            __tmp.put_u8(*val);
20650        }
20651        if matches!(version, MavlinkVersion::V2) {
20652            let len = __tmp.len();
20653            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20654        } else {
20655            __tmp.len()
20656        }
20657    }
20658}
20659#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20660#[doc = ""]
20661#[doc = "ID: 252"]
20662#[derive(Debug, Clone, PartialEq)]
20663#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20664#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20665#[cfg_attr(feature = "ts", derive(TS))]
20666#[cfg_attr(feature = "ts", ts(export))]
20667pub struct NAMED_VALUE_INT_DATA {
20668    #[doc = "Timestamp (time since system boot)."]
20669    pub time_boot_ms: u32,
20670    #[doc = "Signed integer value"]
20671    pub value: i32,
20672    #[doc = "Name of the debug variable"]
20673    #[cfg_attr(feature = "ts", ts(type = "string"))]
20674    pub name: CharArray<10>,
20675}
20676impl NAMED_VALUE_INT_DATA {
20677    pub const ENCODED_LEN: usize = 18usize;
20678    pub const DEFAULT: Self = Self {
20679        time_boot_ms: 0_u32,
20680        value: 0_i32,
20681        name: CharArray::new([0_u8; 10usize]),
20682    };
20683    #[cfg(feature = "arbitrary")]
20684    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20685        use arbitrary::{Arbitrary, Unstructured};
20686        let mut buf = [0u8; 1024];
20687        rng.fill_bytes(&mut buf);
20688        let mut unstructured = Unstructured::new(&buf);
20689        Self::arbitrary(&mut unstructured).unwrap_or_default()
20690    }
20691}
20692impl Default for NAMED_VALUE_INT_DATA {
20693    fn default() -> Self {
20694        Self::DEFAULT.clone()
20695    }
20696}
20697impl MessageData for NAMED_VALUE_INT_DATA {
20698    type Message = MavMessage;
20699    const ID: u32 = 252u32;
20700    const NAME: &'static str = "NAMED_VALUE_INT";
20701    const EXTRA_CRC: u8 = 44u8;
20702    const ENCODED_LEN: usize = 18usize;
20703    fn deser(
20704        _version: MavlinkVersion,
20705        __input: &[u8],
20706    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20707        let avail_len = __input.len();
20708        let mut payload_buf = [0; Self::ENCODED_LEN];
20709        let mut buf = if avail_len < Self::ENCODED_LEN {
20710            payload_buf[0..avail_len].copy_from_slice(__input);
20711            Bytes::new(&payload_buf)
20712        } else {
20713            Bytes::new(__input)
20714        };
20715        let mut __struct = Self::default();
20716        __struct.time_boot_ms = buf.get_u32_le();
20717        __struct.value = buf.get_i32_le();
20718        let mut tmp = [0_u8; 10usize];
20719        for v in &mut tmp {
20720            *v = buf.get_u8();
20721        }
20722        __struct.name = CharArray::new(tmp);
20723        Ok(__struct)
20724    }
20725    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20726        let mut __tmp = BytesMut::new(bytes);
20727        #[allow(clippy::absurd_extreme_comparisons)]
20728        #[allow(unused_comparisons)]
20729        if __tmp.remaining() < Self::ENCODED_LEN {
20730            panic!(
20731                "buffer is too small (need {} bytes, but got {})",
20732                Self::ENCODED_LEN,
20733                __tmp.remaining(),
20734            )
20735        }
20736        __tmp.put_u32_le(self.time_boot_ms);
20737        __tmp.put_i32_le(self.value);
20738        for val in &self.name {
20739            __tmp.put_u8(*val);
20740        }
20741        if matches!(version, MavlinkVersion::V2) {
20742            let len = __tmp.len();
20743            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20744        } else {
20745            __tmp.len()
20746        }
20747    }
20748}
20749#[doc = "The state of the navigation and position controller."]
20750#[doc = ""]
20751#[doc = "ID: 62"]
20752#[derive(Debug, Clone, PartialEq)]
20753#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20754#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20755#[cfg_attr(feature = "ts", derive(TS))]
20756#[cfg_attr(feature = "ts", ts(export))]
20757pub struct NAV_CONTROLLER_OUTPUT_DATA {
20758    #[doc = "Current desired roll"]
20759    pub nav_roll: f32,
20760    #[doc = "Current desired pitch"]
20761    pub nav_pitch: f32,
20762    #[doc = "Current altitude error"]
20763    pub alt_error: f32,
20764    #[doc = "Current airspeed error"]
20765    pub aspd_error: f32,
20766    #[doc = "Current crosstrack error on x-y plane"]
20767    pub xtrack_error: f32,
20768    #[doc = "Current desired heading"]
20769    pub nav_bearing: i16,
20770    #[doc = "Bearing to current waypoint/target"]
20771    pub target_bearing: i16,
20772    #[doc = "Distance to active waypoint"]
20773    pub wp_dist: u16,
20774}
20775impl NAV_CONTROLLER_OUTPUT_DATA {
20776    pub const ENCODED_LEN: usize = 26usize;
20777    pub const DEFAULT: Self = Self {
20778        nav_roll: 0.0_f32,
20779        nav_pitch: 0.0_f32,
20780        alt_error: 0.0_f32,
20781        aspd_error: 0.0_f32,
20782        xtrack_error: 0.0_f32,
20783        nav_bearing: 0_i16,
20784        target_bearing: 0_i16,
20785        wp_dist: 0_u16,
20786    };
20787    #[cfg(feature = "arbitrary")]
20788    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20789        use arbitrary::{Arbitrary, Unstructured};
20790        let mut buf = [0u8; 1024];
20791        rng.fill_bytes(&mut buf);
20792        let mut unstructured = Unstructured::new(&buf);
20793        Self::arbitrary(&mut unstructured).unwrap_or_default()
20794    }
20795}
20796impl Default for NAV_CONTROLLER_OUTPUT_DATA {
20797    fn default() -> Self {
20798        Self::DEFAULT.clone()
20799    }
20800}
20801impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
20802    type Message = MavMessage;
20803    const ID: u32 = 62u32;
20804    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
20805    const EXTRA_CRC: u8 = 183u8;
20806    const ENCODED_LEN: usize = 26usize;
20807    fn deser(
20808        _version: MavlinkVersion,
20809        __input: &[u8],
20810    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20811        let avail_len = __input.len();
20812        let mut payload_buf = [0; Self::ENCODED_LEN];
20813        let mut buf = if avail_len < Self::ENCODED_LEN {
20814            payload_buf[0..avail_len].copy_from_slice(__input);
20815            Bytes::new(&payload_buf)
20816        } else {
20817            Bytes::new(__input)
20818        };
20819        let mut __struct = Self::default();
20820        __struct.nav_roll = buf.get_f32_le();
20821        __struct.nav_pitch = buf.get_f32_le();
20822        __struct.alt_error = buf.get_f32_le();
20823        __struct.aspd_error = buf.get_f32_le();
20824        __struct.xtrack_error = buf.get_f32_le();
20825        __struct.nav_bearing = buf.get_i16_le();
20826        __struct.target_bearing = buf.get_i16_le();
20827        __struct.wp_dist = buf.get_u16_le();
20828        Ok(__struct)
20829    }
20830    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20831        let mut __tmp = BytesMut::new(bytes);
20832        #[allow(clippy::absurd_extreme_comparisons)]
20833        #[allow(unused_comparisons)]
20834        if __tmp.remaining() < Self::ENCODED_LEN {
20835            panic!(
20836                "buffer is too small (need {} bytes, but got {})",
20837                Self::ENCODED_LEN,
20838                __tmp.remaining(),
20839            )
20840        }
20841        __tmp.put_f32_le(self.nav_roll);
20842        __tmp.put_f32_le(self.nav_pitch);
20843        __tmp.put_f32_le(self.alt_error);
20844        __tmp.put_f32_le(self.aspd_error);
20845        __tmp.put_f32_le(self.xtrack_error);
20846        __tmp.put_i16_le(self.nav_bearing);
20847        __tmp.put_i16_le(self.target_bearing);
20848        __tmp.put_u16_le(self.wp_dist);
20849        if matches!(version, MavlinkVersion::V2) {
20850            let len = __tmp.len();
20851            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20852        } else {
20853            __tmp.len()
20854        }
20855    }
20856}
20857#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
20858#[doc = ""]
20859#[doc = "ID: 330"]
20860#[derive(Debug, Clone, PartialEq)]
20861#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20862#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20863#[cfg_attr(feature = "ts", derive(TS))]
20864#[cfg_attr(feature = "ts", ts(export))]
20865pub struct OBSTACLE_DISTANCE_DATA {
20866    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20867    pub time_usec: u64,
20868    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
20869    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20870    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20871    pub distances: [u16; 72],
20872    #[doc = "Minimum distance the sensor can measure."]
20873    pub min_distance: u16,
20874    #[doc = "Maximum distance the sensor can measure."]
20875    pub max_distance: u16,
20876    #[doc = "Class id of the distance sensor type."]
20877    pub sensor_type: MavDistanceSensor,
20878    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
20879    pub increment: u8,
20880    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
20881    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20882    pub increment_f: f32,
20883    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
20884    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20885    pub angle_offset: f32,
20886    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
20887    #[cfg_attr(feature = "serde", serde(default))]
20888    pub frame: MavFrame,
20889}
20890impl OBSTACLE_DISTANCE_DATA {
20891    pub const ENCODED_LEN: usize = 167usize;
20892    pub const DEFAULT: Self = Self {
20893        time_usec: 0_u64,
20894        distances: [0_u16; 72usize],
20895        min_distance: 0_u16,
20896        max_distance: 0_u16,
20897        sensor_type: MavDistanceSensor::DEFAULT,
20898        increment: 0_u8,
20899        increment_f: 0.0_f32,
20900        angle_offset: 0.0_f32,
20901        frame: MavFrame::DEFAULT,
20902    };
20903    #[cfg(feature = "arbitrary")]
20904    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20905        use arbitrary::{Arbitrary, Unstructured};
20906        let mut buf = [0u8; 1024];
20907        rng.fill_bytes(&mut buf);
20908        let mut unstructured = Unstructured::new(&buf);
20909        Self::arbitrary(&mut unstructured).unwrap_or_default()
20910    }
20911}
20912impl Default for OBSTACLE_DISTANCE_DATA {
20913    fn default() -> Self {
20914        Self::DEFAULT.clone()
20915    }
20916}
20917impl MessageData for OBSTACLE_DISTANCE_DATA {
20918    type Message = MavMessage;
20919    const ID: u32 = 330u32;
20920    const NAME: &'static str = "OBSTACLE_DISTANCE";
20921    const EXTRA_CRC: u8 = 23u8;
20922    const ENCODED_LEN: usize = 167usize;
20923    fn deser(
20924        _version: MavlinkVersion,
20925        __input: &[u8],
20926    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20927        let avail_len = __input.len();
20928        let mut payload_buf = [0; Self::ENCODED_LEN];
20929        let mut buf = if avail_len < Self::ENCODED_LEN {
20930            payload_buf[0..avail_len].copy_from_slice(__input);
20931            Bytes::new(&payload_buf)
20932        } else {
20933            Bytes::new(__input)
20934        };
20935        let mut __struct = Self::default();
20936        __struct.time_usec = buf.get_u64_le();
20937        for v in &mut __struct.distances {
20938            let val = buf.get_u16_le();
20939            *v = val;
20940        }
20941        __struct.min_distance = buf.get_u16_le();
20942        __struct.max_distance = buf.get_u16_le();
20943        let tmp = buf.get_u8();
20944        __struct.sensor_type =
20945            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20946                enum_type: "MavDistanceSensor",
20947                value: tmp as u32,
20948            })?;
20949        __struct.increment = buf.get_u8();
20950        __struct.increment_f = buf.get_f32_le();
20951        __struct.angle_offset = buf.get_f32_le();
20952        let tmp = buf.get_u8();
20953        __struct.frame =
20954            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20955                enum_type: "MavFrame",
20956                value: tmp as u32,
20957            })?;
20958        Ok(__struct)
20959    }
20960    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20961        let mut __tmp = BytesMut::new(bytes);
20962        #[allow(clippy::absurd_extreme_comparisons)]
20963        #[allow(unused_comparisons)]
20964        if __tmp.remaining() < Self::ENCODED_LEN {
20965            panic!(
20966                "buffer is too small (need {} bytes, but got {})",
20967                Self::ENCODED_LEN,
20968                __tmp.remaining(),
20969            )
20970        }
20971        __tmp.put_u64_le(self.time_usec);
20972        for val in &self.distances {
20973            __tmp.put_u16_le(*val);
20974        }
20975        __tmp.put_u16_le(self.min_distance);
20976        __tmp.put_u16_le(self.max_distance);
20977        __tmp.put_u8(self.sensor_type as u8);
20978        __tmp.put_u8(self.increment);
20979        if matches!(version, MavlinkVersion::V2) {
20980            __tmp.put_f32_le(self.increment_f);
20981            __tmp.put_f32_le(self.angle_offset);
20982            __tmp.put_u8(self.frame as u8);
20983            let len = __tmp.len();
20984            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20985        } else {
20986            __tmp.len()
20987        }
20988    }
20989}
20990#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
20991#[doc = ""]
20992#[doc = "ID: 331"]
20993#[derive(Debug, Clone, PartialEq)]
20994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20995#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20996#[cfg_attr(feature = "ts", derive(TS))]
20997#[cfg_attr(feature = "ts", ts(export))]
20998pub struct ODOMETRY_DATA {
20999    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21000    pub time_usec: u64,
21001    #[doc = "X Position"]
21002    pub x: f32,
21003    #[doc = "Y Position"]
21004    pub y: f32,
21005    #[doc = "Z Position"]
21006    pub z: f32,
21007    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
21008    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21009    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21010    pub q: [f32; 4],
21011    #[doc = "X linear speed"]
21012    pub vx: f32,
21013    #[doc = "Y linear speed"]
21014    pub vy: f32,
21015    #[doc = "Z linear speed"]
21016    pub vz: f32,
21017    #[doc = "Roll angular speed"]
21018    pub rollspeed: f32,
21019    #[doc = "Pitch angular speed"]
21020    pub pitchspeed: f32,
21021    #[doc = "Yaw angular speed"]
21022    pub yawspeed: f32,
21023    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21024    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21025    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21026    pub pose_covariance: [f32; 21],
21027    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21028    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21029    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21030    pub velocity_covariance: [f32; 21],
21031    #[doc = "Coordinate frame of reference for the pose data."]
21032    pub frame_id: MavFrame,
21033    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
21034    pub child_frame_id: MavFrame,
21035    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
21036    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21037    pub reset_counter: u8,
21038    #[doc = "Type of estimator that is providing the odometry."]
21039    #[cfg_attr(feature = "serde", serde(default))]
21040    pub estimator_type: MavEstimatorType,
21041    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
21042    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21043    pub quality: i8,
21044}
21045impl ODOMETRY_DATA {
21046    pub const ENCODED_LEN: usize = 233usize;
21047    pub const DEFAULT: Self = Self {
21048        time_usec: 0_u64,
21049        x: 0.0_f32,
21050        y: 0.0_f32,
21051        z: 0.0_f32,
21052        q: [0.0_f32; 4usize],
21053        vx: 0.0_f32,
21054        vy: 0.0_f32,
21055        vz: 0.0_f32,
21056        rollspeed: 0.0_f32,
21057        pitchspeed: 0.0_f32,
21058        yawspeed: 0.0_f32,
21059        pose_covariance: [0.0_f32; 21usize],
21060        velocity_covariance: [0.0_f32; 21usize],
21061        frame_id: MavFrame::DEFAULT,
21062        child_frame_id: MavFrame::DEFAULT,
21063        reset_counter: 0_u8,
21064        estimator_type: MavEstimatorType::DEFAULT,
21065        quality: 0_i8,
21066    };
21067    #[cfg(feature = "arbitrary")]
21068    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21069        use arbitrary::{Arbitrary, Unstructured};
21070        let mut buf = [0u8; 1024];
21071        rng.fill_bytes(&mut buf);
21072        let mut unstructured = Unstructured::new(&buf);
21073        Self::arbitrary(&mut unstructured).unwrap_or_default()
21074    }
21075}
21076impl Default for ODOMETRY_DATA {
21077    fn default() -> Self {
21078        Self::DEFAULT.clone()
21079    }
21080}
21081impl MessageData for ODOMETRY_DATA {
21082    type Message = MavMessage;
21083    const ID: u32 = 331u32;
21084    const NAME: &'static str = "ODOMETRY";
21085    const EXTRA_CRC: u8 = 91u8;
21086    const ENCODED_LEN: usize = 233usize;
21087    fn deser(
21088        _version: MavlinkVersion,
21089        __input: &[u8],
21090    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21091        let avail_len = __input.len();
21092        let mut payload_buf = [0; Self::ENCODED_LEN];
21093        let mut buf = if avail_len < Self::ENCODED_LEN {
21094            payload_buf[0..avail_len].copy_from_slice(__input);
21095            Bytes::new(&payload_buf)
21096        } else {
21097            Bytes::new(__input)
21098        };
21099        let mut __struct = Self::default();
21100        __struct.time_usec = buf.get_u64_le();
21101        __struct.x = buf.get_f32_le();
21102        __struct.y = buf.get_f32_le();
21103        __struct.z = buf.get_f32_le();
21104        for v in &mut __struct.q {
21105            let val = buf.get_f32_le();
21106            *v = val;
21107        }
21108        __struct.vx = buf.get_f32_le();
21109        __struct.vy = buf.get_f32_le();
21110        __struct.vz = buf.get_f32_le();
21111        __struct.rollspeed = buf.get_f32_le();
21112        __struct.pitchspeed = buf.get_f32_le();
21113        __struct.yawspeed = buf.get_f32_le();
21114        for v in &mut __struct.pose_covariance {
21115            let val = buf.get_f32_le();
21116            *v = val;
21117        }
21118        for v in &mut __struct.velocity_covariance {
21119            let val = buf.get_f32_le();
21120            *v = val;
21121        }
21122        let tmp = buf.get_u8();
21123        __struct.frame_id =
21124            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21125                enum_type: "MavFrame",
21126                value: tmp as u32,
21127            })?;
21128        let tmp = buf.get_u8();
21129        __struct.child_frame_id =
21130            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21131                enum_type: "MavFrame",
21132                value: tmp as u32,
21133            })?;
21134        __struct.reset_counter = buf.get_u8();
21135        let tmp = buf.get_u8();
21136        __struct.estimator_type =
21137            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21138                enum_type: "MavEstimatorType",
21139                value: tmp as u32,
21140            })?;
21141        __struct.quality = buf.get_i8();
21142        Ok(__struct)
21143    }
21144    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21145        let mut __tmp = BytesMut::new(bytes);
21146        #[allow(clippy::absurd_extreme_comparisons)]
21147        #[allow(unused_comparisons)]
21148        if __tmp.remaining() < Self::ENCODED_LEN {
21149            panic!(
21150                "buffer is too small (need {} bytes, but got {})",
21151                Self::ENCODED_LEN,
21152                __tmp.remaining(),
21153            )
21154        }
21155        __tmp.put_u64_le(self.time_usec);
21156        __tmp.put_f32_le(self.x);
21157        __tmp.put_f32_le(self.y);
21158        __tmp.put_f32_le(self.z);
21159        for val in &self.q {
21160            __tmp.put_f32_le(*val);
21161        }
21162        __tmp.put_f32_le(self.vx);
21163        __tmp.put_f32_le(self.vy);
21164        __tmp.put_f32_le(self.vz);
21165        __tmp.put_f32_le(self.rollspeed);
21166        __tmp.put_f32_le(self.pitchspeed);
21167        __tmp.put_f32_le(self.yawspeed);
21168        for val in &self.pose_covariance {
21169            __tmp.put_f32_le(*val);
21170        }
21171        for val in &self.velocity_covariance {
21172            __tmp.put_f32_le(*val);
21173        }
21174        __tmp.put_u8(self.frame_id as u8);
21175        __tmp.put_u8(self.child_frame_id as u8);
21176        if matches!(version, MavlinkVersion::V2) {
21177            __tmp.put_u8(self.reset_counter);
21178            __tmp.put_u8(self.estimator_type as u8);
21179            __tmp.put_i8(self.quality);
21180            let len = __tmp.len();
21181            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21182        } else {
21183            __tmp.len()
21184        }
21185    }
21186}
21187#[doc = "Hardware status sent by an onboard computer."]
21188#[doc = ""]
21189#[doc = "ID: 390"]
21190#[derive(Debug, Clone, PartialEq)]
21191#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21192#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21193#[cfg_attr(feature = "ts", derive(TS))]
21194#[cfg_attr(feature = "ts", ts(export))]
21195pub struct ONBOARD_COMPUTER_STATUS_DATA {
21196    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21197    pub time_usec: u64,
21198    #[doc = "Time since system boot."]
21199    pub uptime: u32,
21200    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21201    pub ram_usage: u32,
21202    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21203    pub ram_total: u32,
21204    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
21205    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21206    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21207    pub storage_type: [u32; 4],
21208    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21209    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21210    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21211    pub storage_usage: [u32; 4],
21212    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21213    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21214    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21215    pub storage_total: [u32; 4],
21216    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
21217    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21218    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21219    pub link_type: [u32; 6],
21220    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
21221    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21222    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21223    pub link_tx_rate: [u32; 6],
21224    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
21225    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21226    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21227    pub link_rx_rate: [u32; 6],
21228    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
21229    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21230    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21231    pub link_tx_max: [u32; 6],
21232    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
21233    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21234    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21235    pub link_rx_max: [u32; 6],
21236    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
21237    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21238    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21239    pub fan_speed: [i16; 4],
21240    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
21241    pub mavtype: u8,
21242    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21243    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21244    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21245    pub cpu_cores: [u8; 8],
21246    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21247    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21248    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21249    pub cpu_combined: [u8; 10],
21250    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21251    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21252    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21253    pub gpu_cores: [u8; 4],
21254    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21255    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21256    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21257    pub gpu_combined: [u8; 10],
21258    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
21259    pub temperature_board: i8,
21260    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
21261    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21262    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21263    pub temperature_core: [i8; 8],
21264}
21265impl ONBOARD_COMPUTER_STATUS_DATA {
21266    pub const ENCODED_LEN: usize = 238usize;
21267    pub const DEFAULT: Self = Self {
21268        time_usec: 0_u64,
21269        uptime: 0_u32,
21270        ram_usage: 0_u32,
21271        ram_total: 0_u32,
21272        storage_type: [0_u32; 4usize],
21273        storage_usage: [0_u32; 4usize],
21274        storage_total: [0_u32; 4usize],
21275        link_type: [0_u32; 6usize],
21276        link_tx_rate: [0_u32; 6usize],
21277        link_rx_rate: [0_u32; 6usize],
21278        link_tx_max: [0_u32; 6usize],
21279        link_rx_max: [0_u32; 6usize],
21280        fan_speed: [0_i16; 4usize],
21281        mavtype: 0_u8,
21282        cpu_cores: [0_u8; 8usize],
21283        cpu_combined: [0_u8; 10usize],
21284        gpu_cores: [0_u8; 4usize],
21285        gpu_combined: [0_u8; 10usize],
21286        temperature_board: 0_i8,
21287        temperature_core: [0_i8; 8usize],
21288    };
21289    #[cfg(feature = "arbitrary")]
21290    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21291        use arbitrary::{Arbitrary, Unstructured};
21292        let mut buf = [0u8; 1024];
21293        rng.fill_bytes(&mut buf);
21294        let mut unstructured = Unstructured::new(&buf);
21295        Self::arbitrary(&mut unstructured).unwrap_or_default()
21296    }
21297}
21298impl Default for ONBOARD_COMPUTER_STATUS_DATA {
21299    fn default() -> Self {
21300        Self::DEFAULT.clone()
21301    }
21302}
21303impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
21304    type Message = MavMessage;
21305    const ID: u32 = 390u32;
21306    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
21307    const EXTRA_CRC: u8 = 156u8;
21308    const ENCODED_LEN: usize = 238usize;
21309    fn deser(
21310        _version: MavlinkVersion,
21311        __input: &[u8],
21312    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21313        let avail_len = __input.len();
21314        let mut payload_buf = [0; Self::ENCODED_LEN];
21315        let mut buf = if avail_len < Self::ENCODED_LEN {
21316            payload_buf[0..avail_len].copy_from_slice(__input);
21317            Bytes::new(&payload_buf)
21318        } else {
21319            Bytes::new(__input)
21320        };
21321        let mut __struct = Self::default();
21322        __struct.time_usec = buf.get_u64_le();
21323        __struct.uptime = buf.get_u32_le();
21324        __struct.ram_usage = buf.get_u32_le();
21325        __struct.ram_total = buf.get_u32_le();
21326        for v in &mut __struct.storage_type {
21327            let val = buf.get_u32_le();
21328            *v = val;
21329        }
21330        for v in &mut __struct.storage_usage {
21331            let val = buf.get_u32_le();
21332            *v = val;
21333        }
21334        for v in &mut __struct.storage_total {
21335            let val = buf.get_u32_le();
21336            *v = val;
21337        }
21338        for v in &mut __struct.link_type {
21339            let val = buf.get_u32_le();
21340            *v = val;
21341        }
21342        for v in &mut __struct.link_tx_rate {
21343            let val = buf.get_u32_le();
21344            *v = val;
21345        }
21346        for v in &mut __struct.link_rx_rate {
21347            let val = buf.get_u32_le();
21348            *v = val;
21349        }
21350        for v in &mut __struct.link_tx_max {
21351            let val = buf.get_u32_le();
21352            *v = val;
21353        }
21354        for v in &mut __struct.link_rx_max {
21355            let val = buf.get_u32_le();
21356            *v = val;
21357        }
21358        for v in &mut __struct.fan_speed {
21359            let val = buf.get_i16_le();
21360            *v = val;
21361        }
21362        __struct.mavtype = buf.get_u8();
21363        for v in &mut __struct.cpu_cores {
21364            let val = buf.get_u8();
21365            *v = val;
21366        }
21367        for v in &mut __struct.cpu_combined {
21368            let val = buf.get_u8();
21369            *v = val;
21370        }
21371        for v in &mut __struct.gpu_cores {
21372            let val = buf.get_u8();
21373            *v = val;
21374        }
21375        for v in &mut __struct.gpu_combined {
21376            let val = buf.get_u8();
21377            *v = val;
21378        }
21379        __struct.temperature_board = buf.get_i8();
21380        for v in &mut __struct.temperature_core {
21381            let val = buf.get_i8();
21382            *v = val;
21383        }
21384        Ok(__struct)
21385    }
21386    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21387        let mut __tmp = BytesMut::new(bytes);
21388        #[allow(clippy::absurd_extreme_comparisons)]
21389        #[allow(unused_comparisons)]
21390        if __tmp.remaining() < Self::ENCODED_LEN {
21391            panic!(
21392                "buffer is too small (need {} bytes, but got {})",
21393                Self::ENCODED_LEN,
21394                __tmp.remaining(),
21395            )
21396        }
21397        __tmp.put_u64_le(self.time_usec);
21398        __tmp.put_u32_le(self.uptime);
21399        __tmp.put_u32_le(self.ram_usage);
21400        __tmp.put_u32_le(self.ram_total);
21401        for val in &self.storage_type {
21402            __tmp.put_u32_le(*val);
21403        }
21404        for val in &self.storage_usage {
21405            __tmp.put_u32_le(*val);
21406        }
21407        for val in &self.storage_total {
21408            __tmp.put_u32_le(*val);
21409        }
21410        for val in &self.link_type {
21411            __tmp.put_u32_le(*val);
21412        }
21413        for val in &self.link_tx_rate {
21414            __tmp.put_u32_le(*val);
21415        }
21416        for val in &self.link_rx_rate {
21417            __tmp.put_u32_le(*val);
21418        }
21419        for val in &self.link_tx_max {
21420            __tmp.put_u32_le(*val);
21421        }
21422        for val in &self.link_rx_max {
21423            __tmp.put_u32_le(*val);
21424        }
21425        for val in &self.fan_speed {
21426            __tmp.put_i16_le(*val);
21427        }
21428        __tmp.put_u8(self.mavtype);
21429        for val in &self.cpu_cores {
21430            __tmp.put_u8(*val);
21431        }
21432        for val in &self.cpu_combined {
21433            __tmp.put_u8(*val);
21434        }
21435        for val in &self.gpu_cores {
21436            __tmp.put_u8(*val);
21437        }
21438        for val in &self.gpu_combined {
21439            __tmp.put_u8(*val);
21440        }
21441        __tmp.put_i8(self.temperature_board);
21442        for val in &self.temperature_core {
21443            __tmp.put_i8(*val);
21444        }
21445        if matches!(version, MavlinkVersion::V2) {
21446            let len = __tmp.len();
21447            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21448        } else {
21449            __tmp.len()
21450        }
21451    }
21452}
21453#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
21454#[doc = ""]
21455#[doc = "ID: 12918"]
21456#[derive(Debug, Clone, PartialEq)]
21457#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21458#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21459#[cfg_attr(feature = "ts", derive(TS))]
21460#[cfg_attr(feature = "ts", ts(export))]
21461pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
21462    #[doc = "Status level indicating if arming is allowed."]
21463    pub status: MavOdidArmStatus,
21464    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
21465    #[cfg_attr(feature = "ts", ts(type = "string"))]
21466    pub error: CharArray<50>,
21467}
21468impl OPEN_DRONE_ID_ARM_STATUS_DATA {
21469    pub const ENCODED_LEN: usize = 51usize;
21470    pub const DEFAULT: Self = Self {
21471        status: MavOdidArmStatus::DEFAULT,
21472        error: CharArray::new([0_u8; 50usize]),
21473    };
21474    #[cfg(feature = "arbitrary")]
21475    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21476        use arbitrary::{Arbitrary, Unstructured};
21477        let mut buf = [0u8; 1024];
21478        rng.fill_bytes(&mut buf);
21479        let mut unstructured = Unstructured::new(&buf);
21480        Self::arbitrary(&mut unstructured).unwrap_or_default()
21481    }
21482}
21483impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
21484    fn default() -> Self {
21485        Self::DEFAULT.clone()
21486    }
21487}
21488impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
21489    type Message = MavMessage;
21490    const ID: u32 = 12918u32;
21491    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
21492    const EXTRA_CRC: u8 = 139u8;
21493    const ENCODED_LEN: usize = 51usize;
21494    fn deser(
21495        _version: MavlinkVersion,
21496        __input: &[u8],
21497    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21498        let avail_len = __input.len();
21499        let mut payload_buf = [0; Self::ENCODED_LEN];
21500        let mut buf = if avail_len < Self::ENCODED_LEN {
21501            payload_buf[0..avail_len].copy_from_slice(__input);
21502            Bytes::new(&payload_buf)
21503        } else {
21504            Bytes::new(__input)
21505        };
21506        let mut __struct = Self::default();
21507        let tmp = buf.get_u8();
21508        __struct.status =
21509            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21510                enum_type: "MavOdidArmStatus",
21511                value: tmp as u32,
21512            })?;
21513        let mut tmp = [0_u8; 50usize];
21514        for v in &mut tmp {
21515            *v = buf.get_u8();
21516        }
21517        __struct.error = CharArray::new(tmp);
21518        Ok(__struct)
21519    }
21520    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21521        let mut __tmp = BytesMut::new(bytes);
21522        #[allow(clippy::absurd_extreme_comparisons)]
21523        #[allow(unused_comparisons)]
21524        if __tmp.remaining() < Self::ENCODED_LEN {
21525            panic!(
21526                "buffer is too small (need {} bytes, but got {})",
21527                Self::ENCODED_LEN,
21528                __tmp.remaining(),
21529            )
21530        }
21531        __tmp.put_u8(self.status as u8);
21532        for val in &self.error {
21533            __tmp.put_u8(*val);
21534        }
21535        if matches!(version, MavlinkVersion::V2) {
21536            let len = __tmp.len();
21537            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21538        } else {
21539            __tmp.len()
21540        }
21541    }
21542}
21543#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
21544#[doc = ""]
21545#[doc = "ID: 12902"]
21546#[derive(Debug, Clone, PartialEq)]
21547#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21548#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21549#[cfg_attr(feature = "ts", derive(TS))]
21550#[cfg_attr(feature = "ts", ts(export))]
21551pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
21552    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
21553    pub timestamp: u32,
21554    #[doc = "System ID (0 for broadcast)."]
21555    pub target_system: u8,
21556    #[doc = "Component ID (0 for broadcast)."]
21557    pub target_component: u8,
21558    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21559    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21560    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21561    pub id_or_mac: [u8; 20],
21562    #[doc = "Indicates the type of authentication."]
21563    pub authentication_type: MavOdidAuthType,
21564    #[doc = "Allowed range is 0 - 15."]
21565    pub data_page: u8,
21566    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21567    pub last_page_index: u8,
21568    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21569    pub length: u8,
21570    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
21571    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21572    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21573    pub authentication_data: [u8; 23],
21574}
21575impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
21576    pub const ENCODED_LEN: usize = 53usize;
21577    pub const DEFAULT: Self = Self {
21578        timestamp: 0_u32,
21579        target_system: 0_u8,
21580        target_component: 0_u8,
21581        id_or_mac: [0_u8; 20usize],
21582        authentication_type: MavOdidAuthType::DEFAULT,
21583        data_page: 0_u8,
21584        last_page_index: 0_u8,
21585        length: 0_u8,
21586        authentication_data: [0_u8; 23usize],
21587    };
21588    #[cfg(feature = "arbitrary")]
21589    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21590        use arbitrary::{Arbitrary, Unstructured};
21591        let mut buf = [0u8; 1024];
21592        rng.fill_bytes(&mut buf);
21593        let mut unstructured = Unstructured::new(&buf);
21594        Self::arbitrary(&mut unstructured).unwrap_or_default()
21595    }
21596}
21597impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21598    fn default() -> Self {
21599        Self::DEFAULT.clone()
21600    }
21601}
21602impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21603    type Message = MavMessage;
21604    const ID: u32 = 12902u32;
21605    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
21606    const EXTRA_CRC: u8 = 140u8;
21607    const ENCODED_LEN: usize = 53usize;
21608    fn deser(
21609        _version: MavlinkVersion,
21610        __input: &[u8],
21611    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21612        let avail_len = __input.len();
21613        let mut payload_buf = [0; Self::ENCODED_LEN];
21614        let mut buf = if avail_len < Self::ENCODED_LEN {
21615            payload_buf[0..avail_len].copy_from_slice(__input);
21616            Bytes::new(&payload_buf)
21617        } else {
21618            Bytes::new(__input)
21619        };
21620        let mut __struct = Self::default();
21621        __struct.timestamp = buf.get_u32_le();
21622        __struct.target_system = buf.get_u8();
21623        __struct.target_component = buf.get_u8();
21624        for v in &mut __struct.id_or_mac {
21625            let val = buf.get_u8();
21626            *v = val;
21627        }
21628        let tmp = buf.get_u8();
21629        __struct.authentication_type =
21630            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21631                enum_type: "MavOdidAuthType",
21632                value: tmp as u32,
21633            })?;
21634        __struct.data_page = buf.get_u8();
21635        __struct.last_page_index = buf.get_u8();
21636        __struct.length = buf.get_u8();
21637        for v in &mut __struct.authentication_data {
21638            let val = buf.get_u8();
21639            *v = val;
21640        }
21641        Ok(__struct)
21642    }
21643    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21644        let mut __tmp = BytesMut::new(bytes);
21645        #[allow(clippy::absurd_extreme_comparisons)]
21646        #[allow(unused_comparisons)]
21647        if __tmp.remaining() < Self::ENCODED_LEN {
21648            panic!(
21649                "buffer is too small (need {} bytes, but got {})",
21650                Self::ENCODED_LEN,
21651                __tmp.remaining(),
21652            )
21653        }
21654        __tmp.put_u32_le(self.timestamp);
21655        __tmp.put_u8(self.target_system);
21656        __tmp.put_u8(self.target_component);
21657        for val in &self.id_or_mac {
21658            __tmp.put_u8(*val);
21659        }
21660        __tmp.put_u8(self.authentication_type as u8);
21661        __tmp.put_u8(self.data_page);
21662        __tmp.put_u8(self.last_page_index);
21663        __tmp.put_u8(self.length);
21664        for val in &self.authentication_data {
21665            __tmp.put_u8(*val);
21666        }
21667        if matches!(version, MavlinkVersion::V2) {
21668            let len = __tmp.len();
21669            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21670        } else {
21671            __tmp.len()
21672        }
21673    }
21674}
21675#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
21676#[doc = ""]
21677#[doc = "ID: 12900"]
21678#[derive(Debug, Clone, PartialEq)]
21679#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21680#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21681#[cfg_attr(feature = "ts", derive(TS))]
21682#[cfg_attr(feature = "ts", ts(export))]
21683pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
21684    #[doc = "System ID (0 for broadcast)."]
21685    pub target_system: u8,
21686    #[doc = "Component ID (0 for broadcast)."]
21687    pub target_component: u8,
21688    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21689    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21690    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21691    pub id_or_mac: [u8; 20],
21692    #[doc = "Indicates the format for the uas_id field of this message."]
21693    pub id_type: MavOdidIdType,
21694    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
21695    pub ua_type: MavOdidUaType,
21696    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
21697    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21698    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21699    pub uas_id: [u8; 20],
21700}
21701impl OPEN_DRONE_ID_BASIC_ID_DATA {
21702    pub const ENCODED_LEN: usize = 44usize;
21703    pub const DEFAULT: Self = Self {
21704        target_system: 0_u8,
21705        target_component: 0_u8,
21706        id_or_mac: [0_u8; 20usize],
21707        id_type: MavOdidIdType::DEFAULT,
21708        ua_type: MavOdidUaType::DEFAULT,
21709        uas_id: [0_u8; 20usize],
21710    };
21711    #[cfg(feature = "arbitrary")]
21712    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21713        use arbitrary::{Arbitrary, Unstructured};
21714        let mut buf = [0u8; 1024];
21715        rng.fill_bytes(&mut buf);
21716        let mut unstructured = Unstructured::new(&buf);
21717        Self::arbitrary(&mut unstructured).unwrap_or_default()
21718    }
21719}
21720impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
21721    fn default() -> Self {
21722        Self::DEFAULT.clone()
21723    }
21724}
21725impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
21726    type Message = MavMessage;
21727    const ID: u32 = 12900u32;
21728    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
21729    const EXTRA_CRC: u8 = 114u8;
21730    const ENCODED_LEN: usize = 44usize;
21731    fn deser(
21732        _version: MavlinkVersion,
21733        __input: &[u8],
21734    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21735        let avail_len = __input.len();
21736        let mut payload_buf = [0; Self::ENCODED_LEN];
21737        let mut buf = if avail_len < Self::ENCODED_LEN {
21738            payload_buf[0..avail_len].copy_from_slice(__input);
21739            Bytes::new(&payload_buf)
21740        } else {
21741            Bytes::new(__input)
21742        };
21743        let mut __struct = Self::default();
21744        __struct.target_system = buf.get_u8();
21745        __struct.target_component = buf.get_u8();
21746        for v in &mut __struct.id_or_mac {
21747            let val = buf.get_u8();
21748            *v = val;
21749        }
21750        let tmp = buf.get_u8();
21751        __struct.id_type =
21752            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21753                enum_type: "MavOdidIdType",
21754                value: tmp as u32,
21755            })?;
21756        let tmp = buf.get_u8();
21757        __struct.ua_type =
21758            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21759                enum_type: "MavOdidUaType",
21760                value: tmp as u32,
21761            })?;
21762        for v in &mut __struct.uas_id {
21763            let val = buf.get_u8();
21764            *v = val;
21765        }
21766        Ok(__struct)
21767    }
21768    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21769        let mut __tmp = BytesMut::new(bytes);
21770        #[allow(clippy::absurd_extreme_comparisons)]
21771        #[allow(unused_comparisons)]
21772        if __tmp.remaining() < Self::ENCODED_LEN {
21773            panic!(
21774                "buffer is too small (need {} bytes, but got {})",
21775                Self::ENCODED_LEN,
21776                __tmp.remaining(),
21777            )
21778        }
21779        __tmp.put_u8(self.target_system);
21780        __tmp.put_u8(self.target_component);
21781        for val in &self.id_or_mac {
21782            __tmp.put_u8(*val);
21783        }
21784        __tmp.put_u8(self.id_type as u8);
21785        __tmp.put_u8(self.ua_type as u8);
21786        for val in &self.uas_id {
21787            __tmp.put_u8(*val);
21788        }
21789        if matches!(version, MavlinkVersion::V2) {
21790            let len = __tmp.len();
21791            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21792        } else {
21793            __tmp.len()
21794        }
21795    }
21796}
21797#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
21798#[doc = ""]
21799#[doc = "ID: 12901"]
21800#[derive(Debug, Clone, PartialEq)]
21801#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21802#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21803#[cfg_attr(feature = "ts", derive(TS))]
21804#[cfg_attr(feature = "ts", ts(export))]
21805pub struct OPEN_DRONE_ID_LOCATION_DATA {
21806    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21807    pub latitude: i32,
21808    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21809    pub longitude: i32,
21810    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
21811    pub altitude_barometric: f32,
21812    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
21813    pub altitude_geodetic: f32,
21814    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
21815    pub height: f32,
21816    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
21817    pub timestamp: f32,
21818    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
21819    pub direction: u16,
21820    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
21821    pub speed_horizontal: u16,
21822    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
21823    pub speed_vertical: i16,
21824    #[doc = "System ID (0 for broadcast)."]
21825    pub target_system: u8,
21826    #[doc = "Component ID (0 for broadcast)."]
21827    pub target_component: u8,
21828    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21829    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21830    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21831    pub id_or_mac: [u8; 20],
21832    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
21833    pub status: MavOdidStatus,
21834    #[doc = "Indicates the reference point for the height field."]
21835    pub height_reference: MavOdidHeightRef,
21836    #[doc = "The accuracy of the horizontal position."]
21837    pub horizontal_accuracy: MavOdidHorAcc,
21838    #[doc = "The accuracy of the vertical position."]
21839    pub vertical_accuracy: MavOdidVerAcc,
21840    #[doc = "The accuracy of the barometric altitude."]
21841    pub barometer_accuracy: MavOdidVerAcc,
21842    #[doc = "The accuracy of the horizontal and vertical speed."]
21843    pub speed_accuracy: MavOdidSpeedAcc,
21844    #[doc = "The accuracy of the timestamps."]
21845    pub timestamp_accuracy: MavOdidTimeAcc,
21846}
21847impl OPEN_DRONE_ID_LOCATION_DATA {
21848    pub const ENCODED_LEN: usize = 59usize;
21849    pub const DEFAULT: Self = Self {
21850        latitude: 0_i32,
21851        longitude: 0_i32,
21852        altitude_barometric: 0.0_f32,
21853        altitude_geodetic: 0.0_f32,
21854        height: 0.0_f32,
21855        timestamp: 0.0_f32,
21856        direction: 0_u16,
21857        speed_horizontal: 0_u16,
21858        speed_vertical: 0_i16,
21859        target_system: 0_u8,
21860        target_component: 0_u8,
21861        id_or_mac: [0_u8; 20usize],
21862        status: MavOdidStatus::DEFAULT,
21863        height_reference: MavOdidHeightRef::DEFAULT,
21864        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
21865        vertical_accuracy: MavOdidVerAcc::DEFAULT,
21866        barometer_accuracy: MavOdidVerAcc::DEFAULT,
21867        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
21868        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
21869    };
21870    #[cfg(feature = "arbitrary")]
21871    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21872        use arbitrary::{Arbitrary, Unstructured};
21873        let mut buf = [0u8; 1024];
21874        rng.fill_bytes(&mut buf);
21875        let mut unstructured = Unstructured::new(&buf);
21876        Self::arbitrary(&mut unstructured).unwrap_or_default()
21877    }
21878}
21879impl Default for OPEN_DRONE_ID_LOCATION_DATA {
21880    fn default() -> Self {
21881        Self::DEFAULT.clone()
21882    }
21883}
21884impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
21885    type Message = MavMessage;
21886    const ID: u32 = 12901u32;
21887    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
21888    const EXTRA_CRC: u8 = 254u8;
21889    const ENCODED_LEN: usize = 59usize;
21890    fn deser(
21891        _version: MavlinkVersion,
21892        __input: &[u8],
21893    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21894        let avail_len = __input.len();
21895        let mut payload_buf = [0; Self::ENCODED_LEN];
21896        let mut buf = if avail_len < Self::ENCODED_LEN {
21897            payload_buf[0..avail_len].copy_from_slice(__input);
21898            Bytes::new(&payload_buf)
21899        } else {
21900            Bytes::new(__input)
21901        };
21902        let mut __struct = Self::default();
21903        __struct.latitude = buf.get_i32_le();
21904        __struct.longitude = buf.get_i32_le();
21905        __struct.altitude_barometric = buf.get_f32_le();
21906        __struct.altitude_geodetic = buf.get_f32_le();
21907        __struct.height = buf.get_f32_le();
21908        __struct.timestamp = buf.get_f32_le();
21909        __struct.direction = buf.get_u16_le();
21910        __struct.speed_horizontal = buf.get_u16_le();
21911        __struct.speed_vertical = buf.get_i16_le();
21912        __struct.target_system = buf.get_u8();
21913        __struct.target_component = buf.get_u8();
21914        for v in &mut __struct.id_or_mac {
21915            let val = buf.get_u8();
21916            *v = val;
21917        }
21918        let tmp = buf.get_u8();
21919        __struct.status =
21920            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21921                enum_type: "MavOdidStatus",
21922                value: tmp as u32,
21923            })?;
21924        let tmp = buf.get_u8();
21925        __struct.height_reference =
21926            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21927                enum_type: "MavOdidHeightRef",
21928                value: tmp as u32,
21929            })?;
21930        let tmp = buf.get_u8();
21931        __struct.horizontal_accuracy =
21932            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21933                enum_type: "MavOdidHorAcc",
21934                value: tmp as u32,
21935            })?;
21936        let tmp = buf.get_u8();
21937        __struct.vertical_accuracy =
21938            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21939                enum_type: "MavOdidVerAcc",
21940                value: tmp as u32,
21941            })?;
21942        let tmp = buf.get_u8();
21943        __struct.barometer_accuracy =
21944            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21945                enum_type: "MavOdidVerAcc",
21946                value: tmp as u32,
21947            })?;
21948        let tmp = buf.get_u8();
21949        __struct.speed_accuracy =
21950            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21951                enum_type: "MavOdidSpeedAcc",
21952                value: tmp as u32,
21953            })?;
21954        let tmp = buf.get_u8();
21955        __struct.timestamp_accuracy =
21956            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21957                enum_type: "MavOdidTimeAcc",
21958                value: tmp as u32,
21959            })?;
21960        Ok(__struct)
21961    }
21962    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21963        let mut __tmp = BytesMut::new(bytes);
21964        #[allow(clippy::absurd_extreme_comparisons)]
21965        #[allow(unused_comparisons)]
21966        if __tmp.remaining() < Self::ENCODED_LEN {
21967            panic!(
21968                "buffer is too small (need {} bytes, but got {})",
21969                Self::ENCODED_LEN,
21970                __tmp.remaining(),
21971            )
21972        }
21973        __tmp.put_i32_le(self.latitude);
21974        __tmp.put_i32_le(self.longitude);
21975        __tmp.put_f32_le(self.altitude_barometric);
21976        __tmp.put_f32_le(self.altitude_geodetic);
21977        __tmp.put_f32_le(self.height);
21978        __tmp.put_f32_le(self.timestamp);
21979        __tmp.put_u16_le(self.direction);
21980        __tmp.put_u16_le(self.speed_horizontal);
21981        __tmp.put_i16_le(self.speed_vertical);
21982        __tmp.put_u8(self.target_system);
21983        __tmp.put_u8(self.target_component);
21984        for val in &self.id_or_mac {
21985            __tmp.put_u8(*val);
21986        }
21987        __tmp.put_u8(self.status as u8);
21988        __tmp.put_u8(self.height_reference as u8);
21989        __tmp.put_u8(self.horizontal_accuracy as u8);
21990        __tmp.put_u8(self.vertical_accuracy as u8);
21991        __tmp.put_u8(self.barometer_accuracy as u8);
21992        __tmp.put_u8(self.speed_accuracy as u8);
21993        __tmp.put_u8(self.timestamp_accuracy as u8);
21994        if matches!(version, MavlinkVersion::V2) {
21995            let len = __tmp.len();
21996            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21997        } else {
21998            __tmp.len()
21999        }
22000    }
22001}
22002#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
22003#[doc = ""]
22004#[doc = "ID: 12915"]
22005#[derive(Debug, Clone, PartialEq)]
22006#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22007#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22008#[cfg_attr(feature = "ts", derive(TS))]
22009#[cfg_attr(feature = "ts", ts(export))]
22010pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22011    #[doc = "System ID (0 for broadcast)."]
22012    pub target_system: u8,
22013    #[doc = "Component ID (0 for broadcast)."]
22014    pub target_component: u8,
22015    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22016    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22017    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22018    pub id_or_mac: [u8; 20],
22019    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
22020    pub single_message_size: u8,
22021    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
22022    pub msg_pack_size: u8,
22023    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
22024    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22025    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22026    pub messages: [u8; 225],
22027}
22028impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22029    pub const ENCODED_LEN: usize = 249usize;
22030    pub const DEFAULT: Self = Self {
22031        target_system: 0_u8,
22032        target_component: 0_u8,
22033        id_or_mac: [0_u8; 20usize],
22034        single_message_size: 0_u8,
22035        msg_pack_size: 0_u8,
22036        messages: [0_u8; 225usize],
22037    };
22038    #[cfg(feature = "arbitrary")]
22039    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22040        use arbitrary::{Arbitrary, Unstructured};
22041        let mut buf = [0u8; 1024];
22042        rng.fill_bytes(&mut buf);
22043        let mut unstructured = Unstructured::new(&buf);
22044        Self::arbitrary(&mut unstructured).unwrap_or_default()
22045    }
22046}
22047impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22048    fn default() -> Self {
22049        Self::DEFAULT.clone()
22050    }
22051}
22052impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22053    type Message = MavMessage;
22054    const ID: u32 = 12915u32;
22055    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
22056    const EXTRA_CRC: u8 = 94u8;
22057    const ENCODED_LEN: usize = 249usize;
22058    fn deser(
22059        _version: MavlinkVersion,
22060        __input: &[u8],
22061    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22062        let avail_len = __input.len();
22063        let mut payload_buf = [0; Self::ENCODED_LEN];
22064        let mut buf = if avail_len < Self::ENCODED_LEN {
22065            payload_buf[0..avail_len].copy_from_slice(__input);
22066            Bytes::new(&payload_buf)
22067        } else {
22068            Bytes::new(__input)
22069        };
22070        let mut __struct = Self::default();
22071        __struct.target_system = buf.get_u8();
22072        __struct.target_component = buf.get_u8();
22073        for v in &mut __struct.id_or_mac {
22074            let val = buf.get_u8();
22075            *v = val;
22076        }
22077        __struct.single_message_size = buf.get_u8();
22078        __struct.msg_pack_size = buf.get_u8();
22079        for v in &mut __struct.messages {
22080            let val = buf.get_u8();
22081            *v = val;
22082        }
22083        Ok(__struct)
22084    }
22085    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22086        let mut __tmp = BytesMut::new(bytes);
22087        #[allow(clippy::absurd_extreme_comparisons)]
22088        #[allow(unused_comparisons)]
22089        if __tmp.remaining() < Self::ENCODED_LEN {
22090            panic!(
22091                "buffer is too small (need {} bytes, but got {})",
22092                Self::ENCODED_LEN,
22093                __tmp.remaining(),
22094            )
22095        }
22096        __tmp.put_u8(self.target_system);
22097        __tmp.put_u8(self.target_component);
22098        for val in &self.id_or_mac {
22099            __tmp.put_u8(*val);
22100        }
22101        __tmp.put_u8(self.single_message_size);
22102        __tmp.put_u8(self.msg_pack_size);
22103        for val in &self.messages {
22104            __tmp.put_u8(*val);
22105        }
22106        if matches!(version, MavlinkVersion::V2) {
22107            let len = __tmp.len();
22108            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22109        } else {
22110            __tmp.len()
22111        }
22112    }
22113}
22114#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
22115#[doc = ""]
22116#[doc = "ID: 12905"]
22117#[derive(Debug, Clone, PartialEq)]
22118#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22119#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22120#[cfg_attr(feature = "ts", derive(TS))]
22121#[cfg_attr(feature = "ts", ts(export))]
22122pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
22123    #[doc = "System ID (0 for broadcast)."]
22124    pub target_system: u8,
22125    #[doc = "Component ID (0 for broadcast)."]
22126    pub target_component: u8,
22127    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22128    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22129    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22130    pub id_or_mac: [u8; 20],
22131    #[doc = "Indicates the type of the operator_id field."]
22132    pub operator_id_type: MavOdidOperatorIdType,
22133    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22134    #[cfg_attr(feature = "ts", ts(type = "string"))]
22135    pub operator_id: CharArray<20>,
22136}
22137impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
22138    pub const ENCODED_LEN: usize = 43usize;
22139    pub const DEFAULT: Self = Self {
22140        target_system: 0_u8,
22141        target_component: 0_u8,
22142        id_or_mac: [0_u8; 20usize],
22143        operator_id_type: MavOdidOperatorIdType::DEFAULT,
22144        operator_id: CharArray::new([0_u8; 20usize]),
22145    };
22146    #[cfg(feature = "arbitrary")]
22147    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22148        use arbitrary::{Arbitrary, Unstructured};
22149        let mut buf = [0u8; 1024];
22150        rng.fill_bytes(&mut buf);
22151        let mut unstructured = Unstructured::new(&buf);
22152        Self::arbitrary(&mut unstructured).unwrap_or_default()
22153    }
22154}
22155impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22156    fn default() -> Self {
22157        Self::DEFAULT.clone()
22158    }
22159}
22160impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22161    type Message = MavMessage;
22162    const ID: u32 = 12905u32;
22163    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
22164    const EXTRA_CRC: u8 = 49u8;
22165    const ENCODED_LEN: usize = 43usize;
22166    fn deser(
22167        _version: MavlinkVersion,
22168        __input: &[u8],
22169    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22170        let avail_len = __input.len();
22171        let mut payload_buf = [0; Self::ENCODED_LEN];
22172        let mut buf = if avail_len < Self::ENCODED_LEN {
22173            payload_buf[0..avail_len].copy_from_slice(__input);
22174            Bytes::new(&payload_buf)
22175        } else {
22176            Bytes::new(__input)
22177        };
22178        let mut __struct = Self::default();
22179        __struct.target_system = buf.get_u8();
22180        __struct.target_component = buf.get_u8();
22181        for v in &mut __struct.id_or_mac {
22182            let val = buf.get_u8();
22183            *v = val;
22184        }
22185        let tmp = buf.get_u8();
22186        __struct.operator_id_type =
22187            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22188                enum_type: "MavOdidOperatorIdType",
22189                value: tmp as u32,
22190            })?;
22191        let mut tmp = [0_u8; 20usize];
22192        for v in &mut tmp {
22193            *v = buf.get_u8();
22194        }
22195        __struct.operator_id = CharArray::new(tmp);
22196        Ok(__struct)
22197    }
22198    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22199        let mut __tmp = BytesMut::new(bytes);
22200        #[allow(clippy::absurd_extreme_comparisons)]
22201        #[allow(unused_comparisons)]
22202        if __tmp.remaining() < Self::ENCODED_LEN {
22203            panic!(
22204                "buffer is too small (need {} bytes, but got {})",
22205                Self::ENCODED_LEN,
22206                __tmp.remaining(),
22207            )
22208        }
22209        __tmp.put_u8(self.target_system);
22210        __tmp.put_u8(self.target_component);
22211        for val in &self.id_or_mac {
22212            __tmp.put_u8(*val);
22213        }
22214        __tmp.put_u8(self.operator_id_type as u8);
22215        for val in &self.operator_id {
22216            __tmp.put_u8(*val);
22217        }
22218        if matches!(version, MavlinkVersion::V2) {
22219            let len = __tmp.len();
22220            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22221        } else {
22222            __tmp.len()
22223        }
22224    }
22225}
22226#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
22227#[doc = ""]
22228#[doc = "ID: 12903"]
22229#[derive(Debug, Clone, PartialEq)]
22230#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22231#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22232#[cfg_attr(feature = "ts", derive(TS))]
22233#[cfg_attr(feature = "ts", ts(export))]
22234pub struct OPEN_DRONE_ID_SELF_ID_DATA {
22235    #[doc = "System ID (0 for broadcast)."]
22236    pub target_system: u8,
22237    #[doc = "Component ID (0 for broadcast)."]
22238    pub target_component: u8,
22239    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22240    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22241    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22242    pub id_or_mac: [u8; 20],
22243    #[doc = "Indicates the type of the description field."]
22244    pub description_type: MavOdidDescType,
22245    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22246    #[cfg_attr(feature = "ts", ts(type = "string"))]
22247    pub description: CharArray<23>,
22248}
22249impl OPEN_DRONE_ID_SELF_ID_DATA {
22250    pub const ENCODED_LEN: usize = 46usize;
22251    pub const DEFAULT: Self = Self {
22252        target_system: 0_u8,
22253        target_component: 0_u8,
22254        id_or_mac: [0_u8; 20usize],
22255        description_type: MavOdidDescType::DEFAULT,
22256        description: CharArray::new([0_u8; 23usize]),
22257    };
22258    #[cfg(feature = "arbitrary")]
22259    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22260        use arbitrary::{Arbitrary, Unstructured};
22261        let mut buf = [0u8; 1024];
22262        rng.fill_bytes(&mut buf);
22263        let mut unstructured = Unstructured::new(&buf);
22264        Self::arbitrary(&mut unstructured).unwrap_or_default()
22265    }
22266}
22267impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
22268    fn default() -> Self {
22269        Self::DEFAULT.clone()
22270    }
22271}
22272impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
22273    type Message = MavMessage;
22274    const ID: u32 = 12903u32;
22275    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
22276    const EXTRA_CRC: u8 = 249u8;
22277    const ENCODED_LEN: usize = 46usize;
22278    fn deser(
22279        _version: MavlinkVersion,
22280        __input: &[u8],
22281    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22282        let avail_len = __input.len();
22283        let mut payload_buf = [0; Self::ENCODED_LEN];
22284        let mut buf = if avail_len < Self::ENCODED_LEN {
22285            payload_buf[0..avail_len].copy_from_slice(__input);
22286            Bytes::new(&payload_buf)
22287        } else {
22288            Bytes::new(__input)
22289        };
22290        let mut __struct = Self::default();
22291        __struct.target_system = buf.get_u8();
22292        __struct.target_component = buf.get_u8();
22293        for v in &mut __struct.id_or_mac {
22294            let val = buf.get_u8();
22295            *v = val;
22296        }
22297        let tmp = buf.get_u8();
22298        __struct.description_type =
22299            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22300                enum_type: "MavOdidDescType",
22301                value: tmp as u32,
22302            })?;
22303        let mut tmp = [0_u8; 23usize];
22304        for v in &mut tmp {
22305            *v = buf.get_u8();
22306        }
22307        __struct.description = CharArray::new(tmp);
22308        Ok(__struct)
22309    }
22310    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22311        let mut __tmp = BytesMut::new(bytes);
22312        #[allow(clippy::absurd_extreme_comparisons)]
22313        #[allow(unused_comparisons)]
22314        if __tmp.remaining() < Self::ENCODED_LEN {
22315            panic!(
22316                "buffer is too small (need {} bytes, but got {})",
22317                Self::ENCODED_LEN,
22318                __tmp.remaining(),
22319            )
22320        }
22321        __tmp.put_u8(self.target_system);
22322        __tmp.put_u8(self.target_component);
22323        for val in &self.id_or_mac {
22324            __tmp.put_u8(*val);
22325        }
22326        __tmp.put_u8(self.description_type as u8);
22327        for val in &self.description {
22328            __tmp.put_u8(*val);
22329        }
22330        if matches!(version, MavlinkVersion::V2) {
22331            let len = __tmp.len();
22332            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22333        } else {
22334            __tmp.len()
22335        }
22336    }
22337}
22338#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
22339#[doc = ""]
22340#[doc = "ID: 12904"]
22341#[derive(Debug, Clone, PartialEq)]
22342#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22343#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22344#[cfg_attr(feature = "ts", derive(TS))]
22345#[cfg_attr(feature = "ts", ts(export))]
22346pub struct OPEN_DRONE_ID_SYSTEM_DATA {
22347    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22348    pub operator_latitude: i32,
22349    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22350    pub operator_longitude: i32,
22351    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22352    pub area_ceiling: f32,
22353    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22354    pub area_floor: f32,
22355    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22356    pub operator_altitude_geo: f32,
22357    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22358    pub timestamp: u32,
22359    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
22360    pub area_count: u16,
22361    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
22362    pub area_radius: u16,
22363    #[doc = "System ID (0 for broadcast)."]
22364    pub target_system: u8,
22365    #[doc = "Component ID (0 for broadcast)."]
22366    pub target_component: u8,
22367    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22368    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22369    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22370    pub id_or_mac: [u8; 20],
22371    #[doc = "Specifies the operator location type."]
22372    pub operator_location_type: MavOdidOperatorLocationType,
22373    #[doc = "Specifies the classification type of the UA."]
22374    pub classification_type: MavOdidClassificationType,
22375    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
22376    pub category_eu: MavOdidCategoryEu,
22377    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
22378    pub class_eu: MavOdidClassEu,
22379}
22380impl OPEN_DRONE_ID_SYSTEM_DATA {
22381    pub const ENCODED_LEN: usize = 54usize;
22382    pub const DEFAULT: Self = Self {
22383        operator_latitude: 0_i32,
22384        operator_longitude: 0_i32,
22385        area_ceiling: 0.0_f32,
22386        area_floor: 0.0_f32,
22387        operator_altitude_geo: 0.0_f32,
22388        timestamp: 0_u32,
22389        area_count: 0_u16,
22390        area_radius: 0_u16,
22391        target_system: 0_u8,
22392        target_component: 0_u8,
22393        id_or_mac: [0_u8; 20usize],
22394        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
22395        classification_type: MavOdidClassificationType::DEFAULT,
22396        category_eu: MavOdidCategoryEu::DEFAULT,
22397        class_eu: MavOdidClassEu::DEFAULT,
22398    };
22399    #[cfg(feature = "arbitrary")]
22400    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22401        use arbitrary::{Arbitrary, Unstructured};
22402        let mut buf = [0u8; 1024];
22403        rng.fill_bytes(&mut buf);
22404        let mut unstructured = Unstructured::new(&buf);
22405        Self::arbitrary(&mut unstructured).unwrap_or_default()
22406    }
22407}
22408impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
22409    fn default() -> Self {
22410        Self::DEFAULT.clone()
22411    }
22412}
22413impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
22414    type Message = MavMessage;
22415    const ID: u32 = 12904u32;
22416    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
22417    const EXTRA_CRC: u8 = 77u8;
22418    const ENCODED_LEN: usize = 54usize;
22419    fn deser(
22420        _version: MavlinkVersion,
22421        __input: &[u8],
22422    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22423        let avail_len = __input.len();
22424        let mut payload_buf = [0; Self::ENCODED_LEN];
22425        let mut buf = if avail_len < Self::ENCODED_LEN {
22426            payload_buf[0..avail_len].copy_from_slice(__input);
22427            Bytes::new(&payload_buf)
22428        } else {
22429            Bytes::new(__input)
22430        };
22431        let mut __struct = Self::default();
22432        __struct.operator_latitude = buf.get_i32_le();
22433        __struct.operator_longitude = buf.get_i32_le();
22434        __struct.area_ceiling = buf.get_f32_le();
22435        __struct.area_floor = buf.get_f32_le();
22436        __struct.operator_altitude_geo = buf.get_f32_le();
22437        __struct.timestamp = buf.get_u32_le();
22438        __struct.area_count = buf.get_u16_le();
22439        __struct.area_radius = buf.get_u16_le();
22440        __struct.target_system = buf.get_u8();
22441        __struct.target_component = buf.get_u8();
22442        for v in &mut __struct.id_or_mac {
22443            let val = buf.get_u8();
22444            *v = val;
22445        }
22446        let tmp = buf.get_u8();
22447        __struct.operator_location_type =
22448            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22449                enum_type: "MavOdidOperatorLocationType",
22450                value: tmp as u32,
22451            })?;
22452        let tmp = buf.get_u8();
22453        __struct.classification_type =
22454            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22455                enum_type: "MavOdidClassificationType",
22456                value: tmp as u32,
22457            })?;
22458        let tmp = buf.get_u8();
22459        __struct.category_eu =
22460            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22461                enum_type: "MavOdidCategoryEu",
22462                value: tmp as u32,
22463            })?;
22464        let tmp = buf.get_u8();
22465        __struct.class_eu =
22466            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22467                enum_type: "MavOdidClassEu",
22468                value: tmp as u32,
22469            })?;
22470        Ok(__struct)
22471    }
22472    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22473        let mut __tmp = BytesMut::new(bytes);
22474        #[allow(clippy::absurd_extreme_comparisons)]
22475        #[allow(unused_comparisons)]
22476        if __tmp.remaining() < Self::ENCODED_LEN {
22477            panic!(
22478                "buffer is too small (need {} bytes, but got {})",
22479                Self::ENCODED_LEN,
22480                __tmp.remaining(),
22481            )
22482        }
22483        __tmp.put_i32_le(self.operator_latitude);
22484        __tmp.put_i32_le(self.operator_longitude);
22485        __tmp.put_f32_le(self.area_ceiling);
22486        __tmp.put_f32_le(self.area_floor);
22487        __tmp.put_f32_le(self.operator_altitude_geo);
22488        __tmp.put_u32_le(self.timestamp);
22489        __tmp.put_u16_le(self.area_count);
22490        __tmp.put_u16_le(self.area_radius);
22491        __tmp.put_u8(self.target_system);
22492        __tmp.put_u8(self.target_component);
22493        for val in &self.id_or_mac {
22494            __tmp.put_u8(*val);
22495        }
22496        __tmp.put_u8(self.operator_location_type as u8);
22497        __tmp.put_u8(self.classification_type as u8);
22498        __tmp.put_u8(self.category_eu as u8);
22499        __tmp.put_u8(self.class_eu as u8);
22500        if matches!(version, MavlinkVersion::V2) {
22501            let len = __tmp.len();
22502            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22503        } else {
22504            __tmp.len()
22505        }
22506    }
22507}
22508#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
22509#[doc = ""]
22510#[doc = "ID: 12919"]
22511#[derive(Debug, Clone, PartialEq)]
22512#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22513#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22514#[cfg_attr(feature = "ts", derive(TS))]
22515#[cfg_attr(feature = "ts", ts(export))]
22516pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22517    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22518    pub operator_latitude: i32,
22519    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22520    pub operator_longitude: i32,
22521    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22522    pub operator_altitude_geo: f32,
22523    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22524    pub timestamp: u32,
22525    #[doc = "System ID (0 for broadcast)."]
22526    pub target_system: u8,
22527    #[doc = "Component ID (0 for broadcast)."]
22528    pub target_component: u8,
22529}
22530impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22531    pub const ENCODED_LEN: usize = 18usize;
22532    pub const DEFAULT: Self = Self {
22533        operator_latitude: 0_i32,
22534        operator_longitude: 0_i32,
22535        operator_altitude_geo: 0.0_f32,
22536        timestamp: 0_u32,
22537        target_system: 0_u8,
22538        target_component: 0_u8,
22539    };
22540    #[cfg(feature = "arbitrary")]
22541    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22542        use arbitrary::{Arbitrary, Unstructured};
22543        let mut buf = [0u8; 1024];
22544        rng.fill_bytes(&mut buf);
22545        let mut unstructured = Unstructured::new(&buf);
22546        Self::arbitrary(&mut unstructured).unwrap_or_default()
22547    }
22548}
22549impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22550    fn default() -> Self {
22551        Self::DEFAULT.clone()
22552    }
22553}
22554impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22555    type Message = MavMessage;
22556    const ID: u32 = 12919u32;
22557    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
22558    const EXTRA_CRC: u8 = 7u8;
22559    const ENCODED_LEN: usize = 18usize;
22560    fn deser(
22561        _version: MavlinkVersion,
22562        __input: &[u8],
22563    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22564        let avail_len = __input.len();
22565        let mut payload_buf = [0; Self::ENCODED_LEN];
22566        let mut buf = if avail_len < Self::ENCODED_LEN {
22567            payload_buf[0..avail_len].copy_from_slice(__input);
22568            Bytes::new(&payload_buf)
22569        } else {
22570            Bytes::new(__input)
22571        };
22572        let mut __struct = Self::default();
22573        __struct.operator_latitude = buf.get_i32_le();
22574        __struct.operator_longitude = buf.get_i32_le();
22575        __struct.operator_altitude_geo = buf.get_f32_le();
22576        __struct.timestamp = buf.get_u32_le();
22577        __struct.target_system = buf.get_u8();
22578        __struct.target_component = buf.get_u8();
22579        Ok(__struct)
22580    }
22581    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22582        let mut __tmp = BytesMut::new(bytes);
22583        #[allow(clippy::absurd_extreme_comparisons)]
22584        #[allow(unused_comparisons)]
22585        if __tmp.remaining() < Self::ENCODED_LEN {
22586            panic!(
22587                "buffer is too small (need {} bytes, but got {})",
22588                Self::ENCODED_LEN,
22589                __tmp.remaining(),
22590            )
22591        }
22592        __tmp.put_i32_le(self.operator_latitude);
22593        __tmp.put_i32_le(self.operator_longitude);
22594        __tmp.put_f32_le(self.operator_altitude_geo);
22595        __tmp.put_u32_le(self.timestamp);
22596        __tmp.put_u8(self.target_system);
22597        __tmp.put_u8(self.target_component);
22598        if matches!(version, MavlinkVersion::V2) {
22599            let len = __tmp.len();
22600            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22601        } else {
22602            __tmp.len()
22603        }
22604    }
22605}
22606#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
22607#[doc = ""]
22608#[doc = "ID: 100"]
22609#[derive(Debug, Clone, PartialEq)]
22610#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22611#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22612#[cfg_attr(feature = "ts", derive(TS))]
22613#[cfg_attr(feature = "ts", ts(export))]
22614pub struct OPTICAL_FLOW_DATA {
22615    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22616    pub time_usec: u64,
22617    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
22618    pub flow_comp_m_x: f32,
22619    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
22620    pub flow_comp_m_y: f32,
22621    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
22622    pub ground_distance: f32,
22623    #[doc = "Flow in x-sensor direction"]
22624    pub flow_x: i16,
22625    #[doc = "Flow in y-sensor direction"]
22626    pub flow_y: i16,
22627    #[doc = "Sensor ID"]
22628    pub sensor_id: u8,
22629    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
22630    pub quality: u8,
22631    #[doc = "Flow rate about X axis"]
22632    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22633    pub flow_rate_x: f32,
22634    #[doc = "Flow rate about Y axis"]
22635    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22636    pub flow_rate_y: f32,
22637}
22638impl OPTICAL_FLOW_DATA {
22639    pub const ENCODED_LEN: usize = 34usize;
22640    pub const DEFAULT: Self = Self {
22641        time_usec: 0_u64,
22642        flow_comp_m_x: 0.0_f32,
22643        flow_comp_m_y: 0.0_f32,
22644        ground_distance: 0.0_f32,
22645        flow_x: 0_i16,
22646        flow_y: 0_i16,
22647        sensor_id: 0_u8,
22648        quality: 0_u8,
22649        flow_rate_x: 0.0_f32,
22650        flow_rate_y: 0.0_f32,
22651    };
22652    #[cfg(feature = "arbitrary")]
22653    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22654        use arbitrary::{Arbitrary, Unstructured};
22655        let mut buf = [0u8; 1024];
22656        rng.fill_bytes(&mut buf);
22657        let mut unstructured = Unstructured::new(&buf);
22658        Self::arbitrary(&mut unstructured).unwrap_or_default()
22659    }
22660}
22661impl Default for OPTICAL_FLOW_DATA {
22662    fn default() -> Self {
22663        Self::DEFAULT.clone()
22664    }
22665}
22666impl MessageData for OPTICAL_FLOW_DATA {
22667    type Message = MavMessage;
22668    const ID: u32 = 100u32;
22669    const NAME: &'static str = "OPTICAL_FLOW";
22670    const EXTRA_CRC: u8 = 175u8;
22671    const ENCODED_LEN: usize = 34usize;
22672    fn deser(
22673        _version: MavlinkVersion,
22674        __input: &[u8],
22675    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22676        let avail_len = __input.len();
22677        let mut payload_buf = [0; Self::ENCODED_LEN];
22678        let mut buf = if avail_len < Self::ENCODED_LEN {
22679            payload_buf[0..avail_len].copy_from_slice(__input);
22680            Bytes::new(&payload_buf)
22681        } else {
22682            Bytes::new(__input)
22683        };
22684        let mut __struct = Self::default();
22685        __struct.time_usec = buf.get_u64_le();
22686        __struct.flow_comp_m_x = buf.get_f32_le();
22687        __struct.flow_comp_m_y = buf.get_f32_le();
22688        __struct.ground_distance = buf.get_f32_le();
22689        __struct.flow_x = buf.get_i16_le();
22690        __struct.flow_y = buf.get_i16_le();
22691        __struct.sensor_id = buf.get_u8();
22692        __struct.quality = buf.get_u8();
22693        __struct.flow_rate_x = buf.get_f32_le();
22694        __struct.flow_rate_y = buf.get_f32_le();
22695        Ok(__struct)
22696    }
22697    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22698        let mut __tmp = BytesMut::new(bytes);
22699        #[allow(clippy::absurd_extreme_comparisons)]
22700        #[allow(unused_comparisons)]
22701        if __tmp.remaining() < Self::ENCODED_LEN {
22702            panic!(
22703                "buffer is too small (need {} bytes, but got {})",
22704                Self::ENCODED_LEN,
22705                __tmp.remaining(),
22706            )
22707        }
22708        __tmp.put_u64_le(self.time_usec);
22709        __tmp.put_f32_le(self.flow_comp_m_x);
22710        __tmp.put_f32_le(self.flow_comp_m_y);
22711        __tmp.put_f32_le(self.ground_distance);
22712        __tmp.put_i16_le(self.flow_x);
22713        __tmp.put_i16_le(self.flow_y);
22714        __tmp.put_u8(self.sensor_id);
22715        __tmp.put_u8(self.quality);
22716        if matches!(version, MavlinkVersion::V2) {
22717            __tmp.put_f32_le(self.flow_rate_x);
22718            __tmp.put_f32_le(self.flow_rate_y);
22719            let len = __tmp.len();
22720            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22721        } else {
22722            __tmp.len()
22723        }
22724    }
22725}
22726#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
22727#[doc = ""]
22728#[doc = "ID: 106"]
22729#[derive(Debug, Clone, PartialEq)]
22730#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22731#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22732#[cfg_attr(feature = "ts", derive(TS))]
22733#[cfg_attr(feature = "ts", ts(export))]
22734pub struct OPTICAL_FLOW_RAD_DATA {
22735    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22736    pub time_usec: u64,
22737    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
22738    pub integration_time_us: u32,
22739    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
22740    pub integrated_x: f32,
22741    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
22742    pub integrated_y: f32,
22743    #[doc = "RH rotation around X axis"]
22744    pub integrated_xgyro: f32,
22745    #[doc = "RH rotation around Y axis"]
22746    pub integrated_ygyro: f32,
22747    #[doc = "RH rotation around Z axis"]
22748    pub integrated_zgyro: f32,
22749    #[doc = "Time since the distance was sampled."]
22750    pub time_delta_distance_us: u32,
22751    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
22752    pub distance: f32,
22753    #[doc = "Temperature"]
22754    pub temperature: i16,
22755    #[doc = "Sensor ID"]
22756    pub sensor_id: u8,
22757    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
22758    pub quality: u8,
22759}
22760impl OPTICAL_FLOW_RAD_DATA {
22761    pub const ENCODED_LEN: usize = 44usize;
22762    pub const DEFAULT: Self = Self {
22763        time_usec: 0_u64,
22764        integration_time_us: 0_u32,
22765        integrated_x: 0.0_f32,
22766        integrated_y: 0.0_f32,
22767        integrated_xgyro: 0.0_f32,
22768        integrated_ygyro: 0.0_f32,
22769        integrated_zgyro: 0.0_f32,
22770        time_delta_distance_us: 0_u32,
22771        distance: 0.0_f32,
22772        temperature: 0_i16,
22773        sensor_id: 0_u8,
22774        quality: 0_u8,
22775    };
22776    #[cfg(feature = "arbitrary")]
22777    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22778        use arbitrary::{Arbitrary, Unstructured};
22779        let mut buf = [0u8; 1024];
22780        rng.fill_bytes(&mut buf);
22781        let mut unstructured = Unstructured::new(&buf);
22782        Self::arbitrary(&mut unstructured).unwrap_or_default()
22783    }
22784}
22785impl Default for OPTICAL_FLOW_RAD_DATA {
22786    fn default() -> Self {
22787        Self::DEFAULT.clone()
22788    }
22789}
22790impl MessageData for OPTICAL_FLOW_RAD_DATA {
22791    type Message = MavMessage;
22792    const ID: u32 = 106u32;
22793    const NAME: &'static str = "OPTICAL_FLOW_RAD";
22794    const EXTRA_CRC: u8 = 138u8;
22795    const ENCODED_LEN: usize = 44usize;
22796    fn deser(
22797        _version: MavlinkVersion,
22798        __input: &[u8],
22799    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22800        let avail_len = __input.len();
22801        let mut payload_buf = [0; Self::ENCODED_LEN];
22802        let mut buf = if avail_len < Self::ENCODED_LEN {
22803            payload_buf[0..avail_len].copy_from_slice(__input);
22804            Bytes::new(&payload_buf)
22805        } else {
22806            Bytes::new(__input)
22807        };
22808        let mut __struct = Self::default();
22809        __struct.time_usec = buf.get_u64_le();
22810        __struct.integration_time_us = buf.get_u32_le();
22811        __struct.integrated_x = buf.get_f32_le();
22812        __struct.integrated_y = buf.get_f32_le();
22813        __struct.integrated_xgyro = buf.get_f32_le();
22814        __struct.integrated_ygyro = buf.get_f32_le();
22815        __struct.integrated_zgyro = buf.get_f32_le();
22816        __struct.time_delta_distance_us = buf.get_u32_le();
22817        __struct.distance = buf.get_f32_le();
22818        __struct.temperature = buf.get_i16_le();
22819        __struct.sensor_id = buf.get_u8();
22820        __struct.quality = buf.get_u8();
22821        Ok(__struct)
22822    }
22823    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22824        let mut __tmp = BytesMut::new(bytes);
22825        #[allow(clippy::absurd_extreme_comparisons)]
22826        #[allow(unused_comparisons)]
22827        if __tmp.remaining() < Self::ENCODED_LEN {
22828            panic!(
22829                "buffer is too small (need {} bytes, but got {})",
22830                Self::ENCODED_LEN,
22831                __tmp.remaining(),
22832            )
22833        }
22834        __tmp.put_u64_le(self.time_usec);
22835        __tmp.put_u32_le(self.integration_time_us);
22836        __tmp.put_f32_le(self.integrated_x);
22837        __tmp.put_f32_le(self.integrated_y);
22838        __tmp.put_f32_le(self.integrated_xgyro);
22839        __tmp.put_f32_le(self.integrated_ygyro);
22840        __tmp.put_f32_le(self.integrated_zgyro);
22841        __tmp.put_u32_le(self.time_delta_distance_us);
22842        __tmp.put_f32_le(self.distance);
22843        __tmp.put_i16_le(self.temperature);
22844        __tmp.put_u8(self.sensor_id);
22845        __tmp.put_u8(self.quality);
22846        if matches!(version, MavlinkVersion::V2) {
22847            let len = __tmp.len();
22848            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22849        } else {
22850            __tmp.len()
22851        }
22852    }
22853}
22854#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
22855#[doc = ""]
22856#[doc = "ID: 360"]
22857#[derive(Debug, Clone, PartialEq)]
22858#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22859#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22860#[cfg_attr(feature = "ts", derive(TS))]
22861#[cfg_attr(feature = "ts", ts(export))]
22862pub struct ORBIT_EXECUTION_STATUS_DATA {
22863    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22864    pub time_usec: u64,
22865    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
22866    pub radius: f32,
22867    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
22868    pub x: i32,
22869    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
22870    pub y: i32,
22871    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
22872    pub z: f32,
22873    #[doc = "The coordinate system of the fields: x, y, z."]
22874    pub frame: MavFrame,
22875}
22876impl ORBIT_EXECUTION_STATUS_DATA {
22877    pub const ENCODED_LEN: usize = 25usize;
22878    pub const DEFAULT: Self = Self {
22879        time_usec: 0_u64,
22880        radius: 0.0_f32,
22881        x: 0_i32,
22882        y: 0_i32,
22883        z: 0.0_f32,
22884        frame: MavFrame::DEFAULT,
22885    };
22886    #[cfg(feature = "arbitrary")]
22887    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22888        use arbitrary::{Arbitrary, Unstructured};
22889        let mut buf = [0u8; 1024];
22890        rng.fill_bytes(&mut buf);
22891        let mut unstructured = Unstructured::new(&buf);
22892        Self::arbitrary(&mut unstructured).unwrap_or_default()
22893    }
22894}
22895impl Default for ORBIT_EXECUTION_STATUS_DATA {
22896    fn default() -> Self {
22897        Self::DEFAULT.clone()
22898    }
22899}
22900impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
22901    type Message = MavMessage;
22902    const ID: u32 = 360u32;
22903    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
22904    const EXTRA_CRC: u8 = 11u8;
22905    const ENCODED_LEN: usize = 25usize;
22906    fn deser(
22907        _version: MavlinkVersion,
22908        __input: &[u8],
22909    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22910        let avail_len = __input.len();
22911        let mut payload_buf = [0; Self::ENCODED_LEN];
22912        let mut buf = if avail_len < Self::ENCODED_LEN {
22913            payload_buf[0..avail_len].copy_from_slice(__input);
22914            Bytes::new(&payload_buf)
22915        } else {
22916            Bytes::new(__input)
22917        };
22918        let mut __struct = Self::default();
22919        __struct.time_usec = buf.get_u64_le();
22920        __struct.radius = buf.get_f32_le();
22921        __struct.x = buf.get_i32_le();
22922        __struct.y = buf.get_i32_le();
22923        __struct.z = buf.get_f32_le();
22924        let tmp = buf.get_u8();
22925        __struct.frame =
22926            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22927                enum_type: "MavFrame",
22928                value: tmp as u32,
22929            })?;
22930        Ok(__struct)
22931    }
22932    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22933        let mut __tmp = BytesMut::new(bytes);
22934        #[allow(clippy::absurd_extreme_comparisons)]
22935        #[allow(unused_comparisons)]
22936        if __tmp.remaining() < Self::ENCODED_LEN {
22937            panic!(
22938                "buffer is too small (need {} bytes, but got {})",
22939                Self::ENCODED_LEN,
22940                __tmp.remaining(),
22941            )
22942        }
22943        __tmp.put_u64_le(self.time_usec);
22944        __tmp.put_f32_le(self.radius);
22945        __tmp.put_i32_le(self.x);
22946        __tmp.put_i32_le(self.y);
22947        __tmp.put_f32_le(self.z);
22948        __tmp.put_u8(self.frame as u8);
22949        if matches!(version, MavlinkVersion::V2) {
22950            let len = __tmp.len();
22951            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22952        } else {
22953            __tmp.len()
22954        }
22955    }
22956}
22957#[doc = "Response from a PARAM_EXT_SET message."]
22958#[doc = ""]
22959#[doc = "ID: 324"]
22960#[derive(Debug, Clone, PartialEq)]
22961#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22962#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22963#[cfg_attr(feature = "ts", derive(TS))]
22964#[cfg_attr(feature = "ts", ts(export))]
22965pub struct PARAM_EXT_ACK_DATA {
22966    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
22967    #[cfg_attr(feature = "ts", ts(type = "string"))]
22968    pub param_id: CharArray<16>,
22969    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
22970    #[cfg_attr(feature = "ts", ts(type = "string"))]
22971    pub param_value: CharArray<128>,
22972    #[doc = "Parameter type."]
22973    pub param_type: MavParamExtType,
22974    #[doc = "Result code."]
22975    pub param_result: ParamAck,
22976}
22977impl PARAM_EXT_ACK_DATA {
22978    pub const ENCODED_LEN: usize = 146usize;
22979    pub const DEFAULT: Self = Self {
22980        param_id: CharArray::new([0_u8; 16usize]),
22981        param_value: CharArray::new([0_u8; 128usize]),
22982        param_type: MavParamExtType::DEFAULT,
22983        param_result: ParamAck::DEFAULT,
22984    };
22985    #[cfg(feature = "arbitrary")]
22986    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22987        use arbitrary::{Arbitrary, Unstructured};
22988        let mut buf = [0u8; 1024];
22989        rng.fill_bytes(&mut buf);
22990        let mut unstructured = Unstructured::new(&buf);
22991        Self::arbitrary(&mut unstructured).unwrap_or_default()
22992    }
22993}
22994impl Default for PARAM_EXT_ACK_DATA {
22995    fn default() -> Self {
22996        Self::DEFAULT.clone()
22997    }
22998}
22999impl MessageData for PARAM_EXT_ACK_DATA {
23000    type Message = MavMessage;
23001    const ID: u32 = 324u32;
23002    const NAME: &'static str = "PARAM_EXT_ACK";
23003    const EXTRA_CRC: u8 = 132u8;
23004    const ENCODED_LEN: usize = 146usize;
23005    fn deser(
23006        _version: MavlinkVersion,
23007        __input: &[u8],
23008    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23009        let avail_len = __input.len();
23010        let mut payload_buf = [0; Self::ENCODED_LEN];
23011        let mut buf = if avail_len < Self::ENCODED_LEN {
23012            payload_buf[0..avail_len].copy_from_slice(__input);
23013            Bytes::new(&payload_buf)
23014        } else {
23015            Bytes::new(__input)
23016        };
23017        let mut __struct = Self::default();
23018        let mut tmp = [0_u8; 16usize];
23019        for v in &mut tmp {
23020            *v = buf.get_u8();
23021        }
23022        __struct.param_id = CharArray::new(tmp);
23023        let mut tmp = [0_u8; 128usize];
23024        for v in &mut tmp {
23025            *v = buf.get_u8();
23026        }
23027        __struct.param_value = CharArray::new(tmp);
23028        let tmp = buf.get_u8();
23029        __struct.param_type =
23030            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23031                enum_type: "MavParamExtType",
23032                value: tmp as u32,
23033            })?;
23034        let tmp = buf.get_u8();
23035        __struct.param_result =
23036            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23037                enum_type: "ParamAck",
23038                value: tmp as u32,
23039            })?;
23040        Ok(__struct)
23041    }
23042    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23043        let mut __tmp = BytesMut::new(bytes);
23044        #[allow(clippy::absurd_extreme_comparisons)]
23045        #[allow(unused_comparisons)]
23046        if __tmp.remaining() < Self::ENCODED_LEN {
23047            panic!(
23048                "buffer is too small (need {} bytes, but got {})",
23049                Self::ENCODED_LEN,
23050                __tmp.remaining(),
23051            )
23052        }
23053        for val in &self.param_id {
23054            __tmp.put_u8(*val);
23055        }
23056        for val in &self.param_value {
23057            __tmp.put_u8(*val);
23058        }
23059        __tmp.put_u8(self.param_type as u8);
23060        __tmp.put_u8(self.param_result as u8);
23061        if matches!(version, MavlinkVersion::V2) {
23062            let len = __tmp.len();
23063            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23064        } else {
23065            __tmp.len()
23066        }
23067    }
23068}
23069#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
23070#[doc = ""]
23071#[doc = "ID: 321"]
23072#[derive(Debug, Clone, PartialEq)]
23073#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23074#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23075#[cfg_attr(feature = "ts", derive(TS))]
23076#[cfg_attr(feature = "ts", ts(export))]
23077pub struct PARAM_EXT_REQUEST_LIST_DATA {
23078    #[doc = "System ID"]
23079    pub target_system: u8,
23080    #[doc = "Component ID"]
23081    pub target_component: u8,
23082}
23083impl PARAM_EXT_REQUEST_LIST_DATA {
23084    pub const ENCODED_LEN: usize = 2usize;
23085    pub const DEFAULT: Self = Self {
23086        target_system: 0_u8,
23087        target_component: 0_u8,
23088    };
23089    #[cfg(feature = "arbitrary")]
23090    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23091        use arbitrary::{Arbitrary, Unstructured};
23092        let mut buf = [0u8; 1024];
23093        rng.fill_bytes(&mut buf);
23094        let mut unstructured = Unstructured::new(&buf);
23095        Self::arbitrary(&mut unstructured).unwrap_or_default()
23096    }
23097}
23098impl Default for PARAM_EXT_REQUEST_LIST_DATA {
23099    fn default() -> Self {
23100        Self::DEFAULT.clone()
23101    }
23102}
23103impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
23104    type Message = MavMessage;
23105    const ID: u32 = 321u32;
23106    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
23107    const EXTRA_CRC: u8 = 88u8;
23108    const ENCODED_LEN: usize = 2usize;
23109    fn deser(
23110        _version: MavlinkVersion,
23111        __input: &[u8],
23112    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23113        let avail_len = __input.len();
23114        let mut payload_buf = [0; Self::ENCODED_LEN];
23115        let mut buf = if avail_len < Self::ENCODED_LEN {
23116            payload_buf[0..avail_len].copy_from_slice(__input);
23117            Bytes::new(&payload_buf)
23118        } else {
23119            Bytes::new(__input)
23120        };
23121        let mut __struct = Self::default();
23122        __struct.target_system = buf.get_u8();
23123        __struct.target_component = buf.get_u8();
23124        Ok(__struct)
23125    }
23126    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23127        let mut __tmp = BytesMut::new(bytes);
23128        #[allow(clippy::absurd_extreme_comparisons)]
23129        #[allow(unused_comparisons)]
23130        if __tmp.remaining() < Self::ENCODED_LEN {
23131            panic!(
23132                "buffer is too small (need {} bytes, but got {})",
23133                Self::ENCODED_LEN,
23134                __tmp.remaining(),
23135            )
23136        }
23137        __tmp.put_u8(self.target_system);
23138        __tmp.put_u8(self.target_component);
23139        if matches!(version, MavlinkVersion::V2) {
23140            let len = __tmp.len();
23141            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23142        } else {
23143            __tmp.len()
23144        }
23145    }
23146}
23147#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
23148#[doc = ""]
23149#[doc = "ID: 320"]
23150#[derive(Debug, Clone, PartialEq)]
23151#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23152#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23153#[cfg_attr(feature = "ts", derive(TS))]
23154#[cfg_attr(feature = "ts", ts(export))]
23155pub struct PARAM_EXT_REQUEST_READ_DATA {
23156    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
23157    pub param_index: i16,
23158    #[doc = "System ID"]
23159    pub target_system: u8,
23160    #[doc = "Component ID"]
23161    pub target_component: u8,
23162    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23163    #[cfg_attr(feature = "ts", ts(type = "string"))]
23164    pub param_id: CharArray<16>,
23165}
23166impl PARAM_EXT_REQUEST_READ_DATA {
23167    pub const ENCODED_LEN: usize = 20usize;
23168    pub const DEFAULT: Self = Self {
23169        param_index: 0_i16,
23170        target_system: 0_u8,
23171        target_component: 0_u8,
23172        param_id: CharArray::new([0_u8; 16usize]),
23173    };
23174    #[cfg(feature = "arbitrary")]
23175    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23176        use arbitrary::{Arbitrary, Unstructured};
23177        let mut buf = [0u8; 1024];
23178        rng.fill_bytes(&mut buf);
23179        let mut unstructured = Unstructured::new(&buf);
23180        Self::arbitrary(&mut unstructured).unwrap_or_default()
23181    }
23182}
23183impl Default for PARAM_EXT_REQUEST_READ_DATA {
23184    fn default() -> Self {
23185        Self::DEFAULT.clone()
23186    }
23187}
23188impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
23189    type Message = MavMessage;
23190    const ID: u32 = 320u32;
23191    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
23192    const EXTRA_CRC: u8 = 243u8;
23193    const ENCODED_LEN: usize = 20usize;
23194    fn deser(
23195        _version: MavlinkVersion,
23196        __input: &[u8],
23197    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23198        let avail_len = __input.len();
23199        let mut payload_buf = [0; Self::ENCODED_LEN];
23200        let mut buf = if avail_len < Self::ENCODED_LEN {
23201            payload_buf[0..avail_len].copy_from_slice(__input);
23202            Bytes::new(&payload_buf)
23203        } else {
23204            Bytes::new(__input)
23205        };
23206        let mut __struct = Self::default();
23207        __struct.param_index = buf.get_i16_le();
23208        __struct.target_system = buf.get_u8();
23209        __struct.target_component = buf.get_u8();
23210        let mut tmp = [0_u8; 16usize];
23211        for v in &mut tmp {
23212            *v = buf.get_u8();
23213        }
23214        __struct.param_id = CharArray::new(tmp);
23215        Ok(__struct)
23216    }
23217    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23218        let mut __tmp = BytesMut::new(bytes);
23219        #[allow(clippy::absurd_extreme_comparisons)]
23220        #[allow(unused_comparisons)]
23221        if __tmp.remaining() < Self::ENCODED_LEN {
23222            panic!(
23223                "buffer is too small (need {} bytes, but got {})",
23224                Self::ENCODED_LEN,
23225                __tmp.remaining(),
23226            )
23227        }
23228        __tmp.put_i16_le(self.param_index);
23229        __tmp.put_u8(self.target_system);
23230        __tmp.put_u8(self.target_component);
23231        for val in &self.param_id {
23232            __tmp.put_u8(*val);
23233        }
23234        if matches!(version, MavlinkVersion::V2) {
23235            let len = __tmp.len();
23236            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23237        } else {
23238            __tmp.len()
23239        }
23240    }
23241}
23242#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
23243#[doc = ""]
23244#[doc = "ID: 323"]
23245#[derive(Debug, Clone, PartialEq)]
23246#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23248#[cfg_attr(feature = "ts", derive(TS))]
23249#[cfg_attr(feature = "ts", ts(export))]
23250pub struct PARAM_EXT_SET_DATA {
23251    #[doc = "System ID"]
23252    pub target_system: u8,
23253    #[doc = "Component ID"]
23254    pub target_component: u8,
23255    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23256    #[cfg_attr(feature = "ts", ts(type = "string"))]
23257    pub param_id: CharArray<16>,
23258    #[doc = "Parameter value"]
23259    #[cfg_attr(feature = "ts", ts(type = "string"))]
23260    pub param_value: CharArray<128>,
23261    #[doc = "Parameter type."]
23262    pub param_type: MavParamExtType,
23263}
23264impl PARAM_EXT_SET_DATA {
23265    pub const ENCODED_LEN: usize = 147usize;
23266    pub const DEFAULT: Self = Self {
23267        target_system: 0_u8,
23268        target_component: 0_u8,
23269        param_id: CharArray::new([0_u8; 16usize]),
23270        param_value: CharArray::new([0_u8; 128usize]),
23271        param_type: MavParamExtType::DEFAULT,
23272    };
23273    #[cfg(feature = "arbitrary")]
23274    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23275        use arbitrary::{Arbitrary, Unstructured};
23276        let mut buf = [0u8; 1024];
23277        rng.fill_bytes(&mut buf);
23278        let mut unstructured = Unstructured::new(&buf);
23279        Self::arbitrary(&mut unstructured).unwrap_or_default()
23280    }
23281}
23282impl Default for PARAM_EXT_SET_DATA {
23283    fn default() -> Self {
23284        Self::DEFAULT.clone()
23285    }
23286}
23287impl MessageData for PARAM_EXT_SET_DATA {
23288    type Message = MavMessage;
23289    const ID: u32 = 323u32;
23290    const NAME: &'static str = "PARAM_EXT_SET";
23291    const EXTRA_CRC: u8 = 78u8;
23292    const ENCODED_LEN: usize = 147usize;
23293    fn deser(
23294        _version: MavlinkVersion,
23295        __input: &[u8],
23296    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23297        let avail_len = __input.len();
23298        let mut payload_buf = [0; Self::ENCODED_LEN];
23299        let mut buf = if avail_len < Self::ENCODED_LEN {
23300            payload_buf[0..avail_len].copy_from_slice(__input);
23301            Bytes::new(&payload_buf)
23302        } else {
23303            Bytes::new(__input)
23304        };
23305        let mut __struct = Self::default();
23306        __struct.target_system = buf.get_u8();
23307        __struct.target_component = buf.get_u8();
23308        let mut tmp = [0_u8; 16usize];
23309        for v in &mut tmp {
23310            *v = buf.get_u8();
23311        }
23312        __struct.param_id = CharArray::new(tmp);
23313        let mut tmp = [0_u8; 128usize];
23314        for v in &mut tmp {
23315            *v = buf.get_u8();
23316        }
23317        __struct.param_value = CharArray::new(tmp);
23318        let tmp = buf.get_u8();
23319        __struct.param_type =
23320            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23321                enum_type: "MavParamExtType",
23322                value: tmp as u32,
23323            })?;
23324        Ok(__struct)
23325    }
23326    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23327        let mut __tmp = BytesMut::new(bytes);
23328        #[allow(clippy::absurd_extreme_comparisons)]
23329        #[allow(unused_comparisons)]
23330        if __tmp.remaining() < Self::ENCODED_LEN {
23331            panic!(
23332                "buffer is too small (need {} bytes, but got {})",
23333                Self::ENCODED_LEN,
23334                __tmp.remaining(),
23335            )
23336        }
23337        __tmp.put_u8(self.target_system);
23338        __tmp.put_u8(self.target_component);
23339        for val in &self.param_id {
23340            __tmp.put_u8(*val);
23341        }
23342        for val in &self.param_value {
23343            __tmp.put_u8(*val);
23344        }
23345        __tmp.put_u8(self.param_type as u8);
23346        if matches!(version, MavlinkVersion::V2) {
23347            let len = __tmp.len();
23348            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23349        } else {
23350            __tmp.len()
23351        }
23352    }
23353}
23354#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
23355#[doc = ""]
23356#[doc = "ID: 322"]
23357#[derive(Debug, Clone, PartialEq)]
23358#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23359#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23360#[cfg_attr(feature = "ts", derive(TS))]
23361#[cfg_attr(feature = "ts", ts(export))]
23362pub struct PARAM_EXT_VALUE_DATA {
23363    #[doc = "Total number of parameters"]
23364    pub param_count: u16,
23365    #[doc = "Index of this parameter"]
23366    pub param_index: u16,
23367    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23368    #[cfg_attr(feature = "ts", ts(type = "string"))]
23369    pub param_id: CharArray<16>,
23370    #[doc = "Parameter value"]
23371    #[cfg_attr(feature = "ts", ts(type = "string"))]
23372    pub param_value: CharArray<128>,
23373    #[doc = "Parameter type."]
23374    pub param_type: MavParamExtType,
23375}
23376impl PARAM_EXT_VALUE_DATA {
23377    pub const ENCODED_LEN: usize = 149usize;
23378    pub const DEFAULT: Self = Self {
23379        param_count: 0_u16,
23380        param_index: 0_u16,
23381        param_id: CharArray::new([0_u8; 16usize]),
23382        param_value: CharArray::new([0_u8; 128usize]),
23383        param_type: MavParamExtType::DEFAULT,
23384    };
23385    #[cfg(feature = "arbitrary")]
23386    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23387        use arbitrary::{Arbitrary, Unstructured};
23388        let mut buf = [0u8; 1024];
23389        rng.fill_bytes(&mut buf);
23390        let mut unstructured = Unstructured::new(&buf);
23391        Self::arbitrary(&mut unstructured).unwrap_or_default()
23392    }
23393}
23394impl Default for PARAM_EXT_VALUE_DATA {
23395    fn default() -> Self {
23396        Self::DEFAULT.clone()
23397    }
23398}
23399impl MessageData for PARAM_EXT_VALUE_DATA {
23400    type Message = MavMessage;
23401    const ID: u32 = 322u32;
23402    const NAME: &'static str = "PARAM_EXT_VALUE";
23403    const EXTRA_CRC: u8 = 243u8;
23404    const ENCODED_LEN: usize = 149usize;
23405    fn deser(
23406        _version: MavlinkVersion,
23407        __input: &[u8],
23408    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23409        let avail_len = __input.len();
23410        let mut payload_buf = [0; Self::ENCODED_LEN];
23411        let mut buf = if avail_len < Self::ENCODED_LEN {
23412            payload_buf[0..avail_len].copy_from_slice(__input);
23413            Bytes::new(&payload_buf)
23414        } else {
23415            Bytes::new(__input)
23416        };
23417        let mut __struct = Self::default();
23418        __struct.param_count = buf.get_u16_le();
23419        __struct.param_index = buf.get_u16_le();
23420        let mut tmp = [0_u8; 16usize];
23421        for v in &mut tmp {
23422            *v = buf.get_u8();
23423        }
23424        __struct.param_id = CharArray::new(tmp);
23425        let mut tmp = [0_u8; 128usize];
23426        for v in &mut tmp {
23427            *v = buf.get_u8();
23428        }
23429        __struct.param_value = CharArray::new(tmp);
23430        let tmp = buf.get_u8();
23431        __struct.param_type =
23432            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23433                enum_type: "MavParamExtType",
23434                value: tmp as u32,
23435            })?;
23436        Ok(__struct)
23437    }
23438    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23439        let mut __tmp = BytesMut::new(bytes);
23440        #[allow(clippy::absurd_extreme_comparisons)]
23441        #[allow(unused_comparisons)]
23442        if __tmp.remaining() < Self::ENCODED_LEN {
23443            panic!(
23444                "buffer is too small (need {} bytes, but got {})",
23445                Self::ENCODED_LEN,
23446                __tmp.remaining(),
23447            )
23448        }
23449        __tmp.put_u16_le(self.param_count);
23450        __tmp.put_u16_le(self.param_index);
23451        for val in &self.param_id {
23452            __tmp.put_u8(*val);
23453        }
23454        for val in &self.param_value {
23455            __tmp.put_u8(*val);
23456        }
23457        __tmp.put_u8(self.param_type as u8);
23458        if matches!(version, MavlinkVersion::V2) {
23459            let len = __tmp.len();
23460            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23461        } else {
23462            __tmp.len()
23463        }
23464    }
23465}
23466#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
23467#[doc = ""]
23468#[doc = "ID: 50"]
23469#[derive(Debug, Clone, PartialEq)]
23470#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23471#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23472#[cfg_attr(feature = "ts", derive(TS))]
23473#[cfg_attr(feature = "ts", ts(export))]
23474pub struct PARAM_MAP_RC_DATA {
23475    #[doc = "Initial parameter value"]
23476    pub param_value0: f32,
23477    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
23478    pub scale: f32,
23479    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
23480    pub param_value_min: f32,
23481    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
23482    pub param_value_max: f32,
23483    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
23484    pub param_index: i16,
23485    #[doc = "System ID"]
23486    pub target_system: u8,
23487    #[doc = "Component ID"]
23488    pub target_component: u8,
23489    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23490    #[cfg_attr(feature = "ts", ts(type = "string"))]
23491    pub param_id: CharArray<16>,
23492    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
23493    pub parameter_rc_channel_index: u8,
23494}
23495impl PARAM_MAP_RC_DATA {
23496    pub const ENCODED_LEN: usize = 37usize;
23497    pub const DEFAULT: Self = Self {
23498        param_value0: 0.0_f32,
23499        scale: 0.0_f32,
23500        param_value_min: 0.0_f32,
23501        param_value_max: 0.0_f32,
23502        param_index: 0_i16,
23503        target_system: 0_u8,
23504        target_component: 0_u8,
23505        param_id: CharArray::new([0_u8; 16usize]),
23506        parameter_rc_channel_index: 0_u8,
23507    };
23508    #[cfg(feature = "arbitrary")]
23509    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23510        use arbitrary::{Arbitrary, Unstructured};
23511        let mut buf = [0u8; 1024];
23512        rng.fill_bytes(&mut buf);
23513        let mut unstructured = Unstructured::new(&buf);
23514        Self::arbitrary(&mut unstructured).unwrap_or_default()
23515    }
23516}
23517impl Default for PARAM_MAP_RC_DATA {
23518    fn default() -> Self {
23519        Self::DEFAULT.clone()
23520    }
23521}
23522impl MessageData for PARAM_MAP_RC_DATA {
23523    type Message = MavMessage;
23524    const ID: u32 = 50u32;
23525    const NAME: &'static str = "PARAM_MAP_RC";
23526    const EXTRA_CRC: u8 = 78u8;
23527    const ENCODED_LEN: usize = 37usize;
23528    fn deser(
23529        _version: MavlinkVersion,
23530        __input: &[u8],
23531    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23532        let avail_len = __input.len();
23533        let mut payload_buf = [0; Self::ENCODED_LEN];
23534        let mut buf = if avail_len < Self::ENCODED_LEN {
23535            payload_buf[0..avail_len].copy_from_slice(__input);
23536            Bytes::new(&payload_buf)
23537        } else {
23538            Bytes::new(__input)
23539        };
23540        let mut __struct = Self::default();
23541        __struct.param_value0 = buf.get_f32_le();
23542        __struct.scale = buf.get_f32_le();
23543        __struct.param_value_min = buf.get_f32_le();
23544        __struct.param_value_max = buf.get_f32_le();
23545        __struct.param_index = buf.get_i16_le();
23546        __struct.target_system = buf.get_u8();
23547        __struct.target_component = buf.get_u8();
23548        let mut tmp = [0_u8; 16usize];
23549        for v in &mut tmp {
23550            *v = buf.get_u8();
23551        }
23552        __struct.param_id = CharArray::new(tmp);
23553        __struct.parameter_rc_channel_index = buf.get_u8();
23554        Ok(__struct)
23555    }
23556    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23557        let mut __tmp = BytesMut::new(bytes);
23558        #[allow(clippy::absurd_extreme_comparisons)]
23559        #[allow(unused_comparisons)]
23560        if __tmp.remaining() < Self::ENCODED_LEN {
23561            panic!(
23562                "buffer is too small (need {} bytes, but got {})",
23563                Self::ENCODED_LEN,
23564                __tmp.remaining(),
23565            )
23566        }
23567        __tmp.put_f32_le(self.param_value0);
23568        __tmp.put_f32_le(self.scale);
23569        __tmp.put_f32_le(self.param_value_min);
23570        __tmp.put_f32_le(self.param_value_max);
23571        __tmp.put_i16_le(self.param_index);
23572        __tmp.put_u8(self.target_system);
23573        __tmp.put_u8(self.target_component);
23574        for val in &self.param_id {
23575            __tmp.put_u8(*val);
23576        }
23577        __tmp.put_u8(self.parameter_rc_channel_index);
23578        if matches!(version, MavlinkVersion::V2) {
23579            let len = __tmp.len();
23580            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23581        } else {
23582            __tmp.len()
23583        }
23584    }
23585}
23586#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23587#[doc = ""]
23588#[doc = "ID: 21"]
23589#[derive(Debug, Clone, PartialEq)]
23590#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23591#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23592#[cfg_attr(feature = "ts", derive(TS))]
23593#[cfg_attr(feature = "ts", ts(export))]
23594pub struct PARAM_REQUEST_LIST_DATA {
23595    #[doc = "System ID"]
23596    pub target_system: u8,
23597    #[doc = "Component ID"]
23598    pub target_component: u8,
23599}
23600impl PARAM_REQUEST_LIST_DATA {
23601    pub const ENCODED_LEN: usize = 2usize;
23602    pub const DEFAULT: Self = Self {
23603        target_system: 0_u8,
23604        target_component: 0_u8,
23605    };
23606    #[cfg(feature = "arbitrary")]
23607    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23608        use arbitrary::{Arbitrary, Unstructured};
23609        let mut buf = [0u8; 1024];
23610        rng.fill_bytes(&mut buf);
23611        let mut unstructured = Unstructured::new(&buf);
23612        Self::arbitrary(&mut unstructured).unwrap_or_default()
23613    }
23614}
23615impl Default for PARAM_REQUEST_LIST_DATA {
23616    fn default() -> Self {
23617        Self::DEFAULT.clone()
23618    }
23619}
23620impl MessageData for PARAM_REQUEST_LIST_DATA {
23621    type Message = MavMessage;
23622    const ID: u32 = 21u32;
23623    const NAME: &'static str = "PARAM_REQUEST_LIST";
23624    const EXTRA_CRC: u8 = 159u8;
23625    const ENCODED_LEN: usize = 2usize;
23626    fn deser(
23627        _version: MavlinkVersion,
23628        __input: &[u8],
23629    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23630        let avail_len = __input.len();
23631        let mut payload_buf = [0; Self::ENCODED_LEN];
23632        let mut buf = if avail_len < Self::ENCODED_LEN {
23633            payload_buf[0..avail_len].copy_from_slice(__input);
23634            Bytes::new(&payload_buf)
23635        } else {
23636            Bytes::new(__input)
23637        };
23638        let mut __struct = Self::default();
23639        __struct.target_system = buf.get_u8();
23640        __struct.target_component = buf.get_u8();
23641        Ok(__struct)
23642    }
23643    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23644        let mut __tmp = BytesMut::new(bytes);
23645        #[allow(clippy::absurd_extreme_comparisons)]
23646        #[allow(unused_comparisons)]
23647        if __tmp.remaining() < Self::ENCODED_LEN {
23648            panic!(
23649                "buffer is too small (need {} bytes, but got {})",
23650                Self::ENCODED_LEN,
23651                __tmp.remaining(),
23652            )
23653        }
23654        __tmp.put_u8(self.target_system);
23655        __tmp.put_u8(self.target_component);
23656        if matches!(version, MavlinkVersion::V2) {
23657            let len = __tmp.len();
23658            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23659        } else {
23660            __tmp.len()
23661        }
23662    }
23663}
23664#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
23665#[doc = ""]
23666#[doc = "ID: 20"]
23667#[derive(Debug, Clone, PartialEq)]
23668#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23669#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23670#[cfg_attr(feature = "ts", derive(TS))]
23671#[cfg_attr(feature = "ts", ts(export))]
23672pub struct PARAM_REQUEST_READ_DATA {
23673    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
23674    pub param_index: i16,
23675    #[doc = "System ID"]
23676    pub target_system: u8,
23677    #[doc = "Component ID"]
23678    pub target_component: u8,
23679    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23680    #[cfg_attr(feature = "ts", ts(type = "string"))]
23681    pub param_id: CharArray<16>,
23682}
23683impl PARAM_REQUEST_READ_DATA {
23684    pub const ENCODED_LEN: usize = 20usize;
23685    pub const DEFAULT: Self = Self {
23686        param_index: 0_i16,
23687        target_system: 0_u8,
23688        target_component: 0_u8,
23689        param_id: CharArray::new([0_u8; 16usize]),
23690    };
23691    #[cfg(feature = "arbitrary")]
23692    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23693        use arbitrary::{Arbitrary, Unstructured};
23694        let mut buf = [0u8; 1024];
23695        rng.fill_bytes(&mut buf);
23696        let mut unstructured = Unstructured::new(&buf);
23697        Self::arbitrary(&mut unstructured).unwrap_or_default()
23698    }
23699}
23700impl Default for PARAM_REQUEST_READ_DATA {
23701    fn default() -> Self {
23702        Self::DEFAULT.clone()
23703    }
23704}
23705impl MessageData for PARAM_REQUEST_READ_DATA {
23706    type Message = MavMessage;
23707    const ID: u32 = 20u32;
23708    const NAME: &'static str = "PARAM_REQUEST_READ";
23709    const EXTRA_CRC: u8 = 214u8;
23710    const ENCODED_LEN: usize = 20usize;
23711    fn deser(
23712        _version: MavlinkVersion,
23713        __input: &[u8],
23714    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23715        let avail_len = __input.len();
23716        let mut payload_buf = [0; Self::ENCODED_LEN];
23717        let mut buf = if avail_len < Self::ENCODED_LEN {
23718            payload_buf[0..avail_len].copy_from_slice(__input);
23719            Bytes::new(&payload_buf)
23720        } else {
23721            Bytes::new(__input)
23722        };
23723        let mut __struct = Self::default();
23724        __struct.param_index = buf.get_i16_le();
23725        __struct.target_system = buf.get_u8();
23726        __struct.target_component = buf.get_u8();
23727        let mut tmp = [0_u8; 16usize];
23728        for v in &mut tmp {
23729            *v = buf.get_u8();
23730        }
23731        __struct.param_id = CharArray::new(tmp);
23732        Ok(__struct)
23733    }
23734    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23735        let mut __tmp = BytesMut::new(bytes);
23736        #[allow(clippy::absurd_extreme_comparisons)]
23737        #[allow(unused_comparisons)]
23738        if __tmp.remaining() < Self::ENCODED_LEN {
23739            panic!(
23740                "buffer is too small (need {} bytes, but got {})",
23741                Self::ENCODED_LEN,
23742                __tmp.remaining(),
23743            )
23744        }
23745        __tmp.put_i16_le(self.param_index);
23746        __tmp.put_u8(self.target_system);
23747        __tmp.put_u8(self.target_component);
23748        for val in &self.param_id {
23749            __tmp.put_u8(*val);
23750        }
23751        if matches!(version, MavlinkVersion::V2) {
23752            let len = __tmp.len();
23753            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23754        } else {
23755            __tmp.len()
23756        }
23757    }
23758}
23759#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23760#[doc = ""]
23761#[doc = "ID: 23"]
23762#[derive(Debug, Clone, PartialEq)]
23763#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23764#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23765#[cfg_attr(feature = "ts", derive(TS))]
23766#[cfg_attr(feature = "ts", ts(export))]
23767pub struct PARAM_SET_DATA {
23768    #[doc = "Onboard parameter value"]
23769    pub param_value: f32,
23770    #[doc = "System ID"]
23771    pub target_system: u8,
23772    #[doc = "Component ID"]
23773    pub target_component: u8,
23774    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23775    #[cfg_attr(feature = "ts", ts(type = "string"))]
23776    pub param_id: CharArray<16>,
23777    #[doc = "Onboard parameter type."]
23778    pub param_type: MavParamType,
23779}
23780impl PARAM_SET_DATA {
23781    pub const ENCODED_LEN: usize = 23usize;
23782    pub const DEFAULT: Self = Self {
23783        param_value: 0.0_f32,
23784        target_system: 0_u8,
23785        target_component: 0_u8,
23786        param_id: CharArray::new([0_u8; 16usize]),
23787        param_type: MavParamType::DEFAULT,
23788    };
23789    #[cfg(feature = "arbitrary")]
23790    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23791        use arbitrary::{Arbitrary, Unstructured};
23792        let mut buf = [0u8; 1024];
23793        rng.fill_bytes(&mut buf);
23794        let mut unstructured = Unstructured::new(&buf);
23795        Self::arbitrary(&mut unstructured).unwrap_or_default()
23796    }
23797}
23798impl Default for PARAM_SET_DATA {
23799    fn default() -> Self {
23800        Self::DEFAULT.clone()
23801    }
23802}
23803impl MessageData for PARAM_SET_DATA {
23804    type Message = MavMessage;
23805    const ID: u32 = 23u32;
23806    const NAME: &'static str = "PARAM_SET";
23807    const EXTRA_CRC: u8 = 168u8;
23808    const ENCODED_LEN: usize = 23usize;
23809    fn deser(
23810        _version: MavlinkVersion,
23811        __input: &[u8],
23812    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23813        let avail_len = __input.len();
23814        let mut payload_buf = [0; Self::ENCODED_LEN];
23815        let mut buf = if avail_len < Self::ENCODED_LEN {
23816            payload_buf[0..avail_len].copy_from_slice(__input);
23817            Bytes::new(&payload_buf)
23818        } else {
23819            Bytes::new(__input)
23820        };
23821        let mut __struct = Self::default();
23822        __struct.param_value = buf.get_f32_le();
23823        __struct.target_system = buf.get_u8();
23824        __struct.target_component = buf.get_u8();
23825        let mut tmp = [0_u8; 16usize];
23826        for v in &mut tmp {
23827            *v = buf.get_u8();
23828        }
23829        __struct.param_id = CharArray::new(tmp);
23830        let tmp = buf.get_u8();
23831        __struct.param_type =
23832            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23833                enum_type: "MavParamType",
23834                value: tmp as u32,
23835            })?;
23836        Ok(__struct)
23837    }
23838    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23839        let mut __tmp = BytesMut::new(bytes);
23840        #[allow(clippy::absurd_extreme_comparisons)]
23841        #[allow(unused_comparisons)]
23842        if __tmp.remaining() < Self::ENCODED_LEN {
23843            panic!(
23844                "buffer is too small (need {} bytes, but got {})",
23845                Self::ENCODED_LEN,
23846                __tmp.remaining(),
23847            )
23848        }
23849        __tmp.put_f32_le(self.param_value);
23850        __tmp.put_u8(self.target_system);
23851        __tmp.put_u8(self.target_component);
23852        for val in &self.param_id {
23853            __tmp.put_u8(*val);
23854        }
23855        __tmp.put_u8(self.param_type as u8);
23856        if matches!(version, MavlinkVersion::V2) {
23857            let len = __tmp.len();
23858            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23859        } else {
23860            __tmp.len()
23861        }
23862    }
23863}
23864#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23865#[doc = ""]
23866#[doc = "ID: 22"]
23867#[derive(Debug, Clone, PartialEq)]
23868#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23869#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23870#[cfg_attr(feature = "ts", derive(TS))]
23871#[cfg_attr(feature = "ts", ts(export))]
23872pub struct PARAM_VALUE_DATA {
23873    #[doc = "Onboard parameter value"]
23874    pub param_value: f32,
23875    #[doc = "Total number of onboard parameters"]
23876    pub param_count: u16,
23877    #[doc = "Index of this onboard parameter"]
23878    pub param_index: u16,
23879    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23880    #[cfg_attr(feature = "ts", ts(type = "string"))]
23881    pub param_id: CharArray<16>,
23882    #[doc = "Onboard parameter type."]
23883    pub param_type: MavParamType,
23884}
23885impl PARAM_VALUE_DATA {
23886    pub const ENCODED_LEN: usize = 25usize;
23887    pub const DEFAULT: Self = Self {
23888        param_value: 0.0_f32,
23889        param_count: 0_u16,
23890        param_index: 0_u16,
23891        param_id: CharArray::new([0_u8; 16usize]),
23892        param_type: MavParamType::DEFAULT,
23893    };
23894    #[cfg(feature = "arbitrary")]
23895    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23896        use arbitrary::{Arbitrary, Unstructured};
23897        let mut buf = [0u8; 1024];
23898        rng.fill_bytes(&mut buf);
23899        let mut unstructured = Unstructured::new(&buf);
23900        Self::arbitrary(&mut unstructured).unwrap_or_default()
23901    }
23902}
23903impl Default for PARAM_VALUE_DATA {
23904    fn default() -> Self {
23905        Self::DEFAULT.clone()
23906    }
23907}
23908impl MessageData for PARAM_VALUE_DATA {
23909    type Message = MavMessage;
23910    const ID: u32 = 22u32;
23911    const NAME: &'static str = "PARAM_VALUE";
23912    const EXTRA_CRC: u8 = 220u8;
23913    const ENCODED_LEN: usize = 25usize;
23914    fn deser(
23915        _version: MavlinkVersion,
23916        __input: &[u8],
23917    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23918        let avail_len = __input.len();
23919        let mut payload_buf = [0; Self::ENCODED_LEN];
23920        let mut buf = if avail_len < Self::ENCODED_LEN {
23921            payload_buf[0..avail_len].copy_from_slice(__input);
23922            Bytes::new(&payload_buf)
23923        } else {
23924            Bytes::new(__input)
23925        };
23926        let mut __struct = Self::default();
23927        __struct.param_value = buf.get_f32_le();
23928        __struct.param_count = buf.get_u16_le();
23929        __struct.param_index = buf.get_u16_le();
23930        let mut tmp = [0_u8; 16usize];
23931        for v in &mut tmp {
23932            *v = buf.get_u8();
23933        }
23934        __struct.param_id = CharArray::new(tmp);
23935        let tmp = buf.get_u8();
23936        __struct.param_type =
23937            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23938                enum_type: "MavParamType",
23939                value: tmp as u32,
23940            })?;
23941        Ok(__struct)
23942    }
23943    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23944        let mut __tmp = BytesMut::new(bytes);
23945        #[allow(clippy::absurd_extreme_comparisons)]
23946        #[allow(unused_comparisons)]
23947        if __tmp.remaining() < Self::ENCODED_LEN {
23948            panic!(
23949                "buffer is too small (need {} bytes, but got {})",
23950                Self::ENCODED_LEN,
23951                __tmp.remaining(),
23952            )
23953        }
23954        __tmp.put_f32_le(self.param_value);
23955        __tmp.put_u16_le(self.param_count);
23956        __tmp.put_u16_le(self.param_index);
23957        for val in &self.param_id {
23958            __tmp.put_u8(*val);
23959        }
23960        __tmp.put_u8(self.param_type as u8);
23961        if matches!(version, MavlinkVersion::V2) {
23962            let len = __tmp.len();
23963            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23964        } else {
23965            __tmp.len()
23966        }
23967    }
23968}
23969#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
23970#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
23971#[doc = ""]
23972#[doc = "ID: 4"]
23973#[derive(Debug, Clone, PartialEq)]
23974#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23975#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23976#[cfg_attr(feature = "ts", derive(TS))]
23977#[cfg_attr(feature = "ts", ts(export))]
23978pub struct PING_DATA {
23979    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23980    pub time_usec: u64,
23981    #[doc = "PING sequence"]
23982    pub seq: u32,
23983    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
23984    pub target_system: u8,
23985    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
23986    pub target_component: u8,
23987}
23988impl PING_DATA {
23989    pub const ENCODED_LEN: usize = 14usize;
23990    pub const DEFAULT: Self = Self {
23991        time_usec: 0_u64,
23992        seq: 0_u32,
23993        target_system: 0_u8,
23994        target_component: 0_u8,
23995    };
23996    #[cfg(feature = "arbitrary")]
23997    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23998        use arbitrary::{Arbitrary, Unstructured};
23999        let mut buf = [0u8; 1024];
24000        rng.fill_bytes(&mut buf);
24001        let mut unstructured = Unstructured::new(&buf);
24002        Self::arbitrary(&mut unstructured).unwrap_or_default()
24003    }
24004}
24005impl Default for PING_DATA {
24006    fn default() -> Self {
24007        Self::DEFAULT.clone()
24008    }
24009}
24010impl MessageData for PING_DATA {
24011    type Message = MavMessage;
24012    const ID: u32 = 4u32;
24013    const NAME: &'static str = "PING";
24014    const EXTRA_CRC: u8 = 237u8;
24015    const ENCODED_LEN: usize = 14usize;
24016    fn deser(
24017        _version: MavlinkVersion,
24018        __input: &[u8],
24019    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24020        let avail_len = __input.len();
24021        let mut payload_buf = [0; Self::ENCODED_LEN];
24022        let mut buf = if avail_len < Self::ENCODED_LEN {
24023            payload_buf[0..avail_len].copy_from_slice(__input);
24024            Bytes::new(&payload_buf)
24025        } else {
24026            Bytes::new(__input)
24027        };
24028        let mut __struct = Self::default();
24029        __struct.time_usec = buf.get_u64_le();
24030        __struct.seq = buf.get_u32_le();
24031        __struct.target_system = buf.get_u8();
24032        __struct.target_component = buf.get_u8();
24033        Ok(__struct)
24034    }
24035    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24036        let mut __tmp = BytesMut::new(bytes);
24037        #[allow(clippy::absurd_extreme_comparisons)]
24038        #[allow(unused_comparisons)]
24039        if __tmp.remaining() < Self::ENCODED_LEN {
24040            panic!(
24041                "buffer is too small (need {} bytes, but got {})",
24042                Self::ENCODED_LEN,
24043                __tmp.remaining(),
24044            )
24045        }
24046        __tmp.put_u64_le(self.time_usec);
24047        __tmp.put_u32_le(self.seq);
24048        __tmp.put_u8(self.target_system);
24049        __tmp.put_u8(self.target_component);
24050        if matches!(version, MavlinkVersion::V2) {
24051            let len = __tmp.len();
24052            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24053        } else {
24054            __tmp.len()
24055        }
24056    }
24057}
24058#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
24059#[doc = "Control vehicle tone generation (buzzer)."]
24060#[doc = ""]
24061#[doc = "ID: 258"]
24062#[derive(Debug, Clone, PartialEq)]
24063#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24064#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24065#[cfg_attr(feature = "ts", derive(TS))]
24066#[cfg_attr(feature = "ts", ts(export))]
24067pub struct PLAY_TUNE_DATA {
24068    #[doc = "System ID"]
24069    pub target_system: u8,
24070    #[doc = "Component ID"]
24071    pub target_component: u8,
24072    #[doc = "tune in board specific format"]
24073    #[cfg_attr(feature = "ts", ts(type = "string"))]
24074    pub tune: CharArray<30>,
24075    #[doc = "tune extension (appended to tune)"]
24076    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24077    #[cfg_attr(feature = "ts", ts(type = "string"))]
24078    pub tune2: CharArray<200>,
24079}
24080impl PLAY_TUNE_DATA {
24081    pub const ENCODED_LEN: usize = 232usize;
24082    pub const DEFAULT: Self = Self {
24083        target_system: 0_u8,
24084        target_component: 0_u8,
24085        tune: CharArray::new([0_u8; 30usize]),
24086        tune2: CharArray::new([0_u8; 200usize]),
24087    };
24088    #[cfg(feature = "arbitrary")]
24089    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24090        use arbitrary::{Arbitrary, Unstructured};
24091        let mut buf = [0u8; 1024];
24092        rng.fill_bytes(&mut buf);
24093        let mut unstructured = Unstructured::new(&buf);
24094        Self::arbitrary(&mut unstructured).unwrap_or_default()
24095    }
24096}
24097impl Default for PLAY_TUNE_DATA {
24098    fn default() -> Self {
24099        Self::DEFAULT.clone()
24100    }
24101}
24102impl MessageData for PLAY_TUNE_DATA {
24103    type Message = MavMessage;
24104    const ID: u32 = 258u32;
24105    const NAME: &'static str = "PLAY_TUNE";
24106    const EXTRA_CRC: u8 = 187u8;
24107    const ENCODED_LEN: usize = 232usize;
24108    fn deser(
24109        _version: MavlinkVersion,
24110        __input: &[u8],
24111    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24112        let avail_len = __input.len();
24113        let mut payload_buf = [0; Self::ENCODED_LEN];
24114        let mut buf = if avail_len < Self::ENCODED_LEN {
24115            payload_buf[0..avail_len].copy_from_slice(__input);
24116            Bytes::new(&payload_buf)
24117        } else {
24118            Bytes::new(__input)
24119        };
24120        let mut __struct = Self::default();
24121        __struct.target_system = buf.get_u8();
24122        __struct.target_component = buf.get_u8();
24123        let mut tmp = [0_u8; 30usize];
24124        for v in &mut tmp {
24125            *v = buf.get_u8();
24126        }
24127        __struct.tune = CharArray::new(tmp);
24128        let mut tmp = [0_u8; 200usize];
24129        for v in &mut tmp {
24130            *v = buf.get_u8();
24131        }
24132        __struct.tune2 = CharArray::new(tmp);
24133        Ok(__struct)
24134    }
24135    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24136        let mut __tmp = BytesMut::new(bytes);
24137        #[allow(clippy::absurd_extreme_comparisons)]
24138        #[allow(unused_comparisons)]
24139        if __tmp.remaining() < Self::ENCODED_LEN {
24140            panic!(
24141                "buffer is too small (need {} bytes, but got {})",
24142                Self::ENCODED_LEN,
24143                __tmp.remaining(),
24144            )
24145        }
24146        __tmp.put_u8(self.target_system);
24147        __tmp.put_u8(self.target_component);
24148        for val in &self.tune {
24149            __tmp.put_u8(*val);
24150        }
24151        if matches!(version, MavlinkVersion::V2) {
24152            for val in &self.tune2 {
24153                __tmp.put_u8(*val);
24154            }
24155            let len = __tmp.len();
24156            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24157        } else {
24158            __tmp.len()
24159        }
24160    }
24161}
24162#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
24163#[doc = ""]
24164#[doc = "ID: 400"]
24165#[derive(Debug, Clone, PartialEq)]
24166#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24168#[cfg_attr(feature = "ts", derive(TS))]
24169#[cfg_attr(feature = "ts", ts(export))]
24170pub struct PLAY_TUNE_V2_DATA {
24171    #[doc = "Tune format"]
24172    pub format: TuneFormat,
24173    #[doc = "System ID"]
24174    pub target_system: u8,
24175    #[doc = "Component ID"]
24176    pub target_component: u8,
24177    #[doc = "Tune definition as a NULL-terminated string."]
24178    #[cfg_attr(feature = "ts", ts(type = "string"))]
24179    pub tune: CharArray<248>,
24180}
24181impl PLAY_TUNE_V2_DATA {
24182    pub const ENCODED_LEN: usize = 254usize;
24183    pub const DEFAULT: Self = Self {
24184        format: TuneFormat::DEFAULT,
24185        target_system: 0_u8,
24186        target_component: 0_u8,
24187        tune: CharArray::new([0_u8; 248usize]),
24188    };
24189    #[cfg(feature = "arbitrary")]
24190    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24191        use arbitrary::{Arbitrary, Unstructured};
24192        let mut buf = [0u8; 1024];
24193        rng.fill_bytes(&mut buf);
24194        let mut unstructured = Unstructured::new(&buf);
24195        Self::arbitrary(&mut unstructured).unwrap_or_default()
24196    }
24197}
24198impl Default for PLAY_TUNE_V2_DATA {
24199    fn default() -> Self {
24200        Self::DEFAULT.clone()
24201    }
24202}
24203impl MessageData for PLAY_TUNE_V2_DATA {
24204    type Message = MavMessage;
24205    const ID: u32 = 400u32;
24206    const NAME: &'static str = "PLAY_TUNE_V2";
24207    const EXTRA_CRC: u8 = 110u8;
24208    const ENCODED_LEN: usize = 254usize;
24209    fn deser(
24210        _version: MavlinkVersion,
24211        __input: &[u8],
24212    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24213        let avail_len = __input.len();
24214        let mut payload_buf = [0; Self::ENCODED_LEN];
24215        let mut buf = if avail_len < Self::ENCODED_LEN {
24216            payload_buf[0..avail_len].copy_from_slice(__input);
24217            Bytes::new(&payload_buf)
24218        } else {
24219            Bytes::new(__input)
24220        };
24221        let mut __struct = Self::default();
24222        let tmp = buf.get_u32_le();
24223        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
24224            ::mavlink_core::error::ParserError::InvalidEnum {
24225                enum_type: "TuneFormat",
24226                value: tmp as u32,
24227            },
24228        )?;
24229        __struct.target_system = buf.get_u8();
24230        __struct.target_component = buf.get_u8();
24231        let mut tmp = [0_u8; 248usize];
24232        for v in &mut tmp {
24233            *v = buf.get_u8();
24234        }
24235        __struct.tune = CharArray::new(tmp);
24236        Ok(__struct)
24237    }
24238    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24239        let mut __tmp = BytesMut::new(bytes);
24240        #[allow(clippy::absurd_extreme_comparisons)]
24241        #[allow(unused_comparisons)]
24242        if __tmp.remaining() < Self::ENCODED_LEN {
24243            panic!(
24244                "buffer is too small (need {} bytes, but got {})",
24245                Self::ENCODED_LEN,
24246                __tmp.remaining(),
24247            )
24248        }
24249        __tmp.put_u32_le(self.format as u32);
24250        __tmp.put_u8(self.target_system);
24251        __tmp.put_u8(self.target_component);
24252        for val in &self.tune {
24253            __tmp.put_u8(*val);
24254        }
24255        if matches!(version, MavlinkVersion::V2) {
24256            let len = __tmp.len();
24257            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24258        } else {
24259            __tmp.len()
24260        }
24261    }
24262}
24263#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
24264#[doc = ""]
24265#[doc = "ID: 87"]
24266#[derive(Debug, Clone, PartialEq)]
24267#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24268#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24269#[cfg_attr(feature = "ts", derive(TS))]
24270#[cfg_attr(feature = "ts", ts(export))]
24271pub struct POSITION_TARGET_GLOBAL_INT_DATA {
24272    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
24273    pub time_boot_ms: u32,
24274    #[doc = "Latitude in WGS84 frame"]
24275    pub lat_int: i32,
24276    #[doc = "Longitude in WGS84 frame"]
24277    pub lon_int: i32,
24278    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
24279    pub alt: f32,
24280    #[doc = "X velocity in NED frame"]
24281    pub vx: f32,
24282    #[doc = "Y velocity in NED frame"]
24283    pub vy: f32,
24284    #[doc = "Z velocity in NED frame"]
24285    pub vz: f32,
24286    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24287    pub afx: f32,
24288    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24289    pub afy: f32,
24290    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24291    pub afz: f32,
24292    #[doc = "yaw setpoint"]
24293    pub yaw: f32,
24294    #[doc = "yaw rate setpoint"]
24295    pub yaw_rate: f32,
24296    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24297    pub type_mask: PositionTargetTypemask,
24298    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
24299    pub coordinate_frame: MavFrame,
24300}
24301impl POSITION_TARGET_GLOBAL_INT_DATA {
24302    pub const ENCODED_LEN: usize = 51usize;
24303    pub const DEFAULT: Self = Self {
24304        time_boot_ms: 0_u32,
24305        lat_int: 0_i32,
24306        lon_int: 0_i32,
24307        alt: 0.0_f32,
24308        vx: 0.0_f32,
24309        vy: 0.0_f32,
24310        vz: 0.0_f32,
24311        afx: 0.0_f32,
24312        afy: 0.0_f32,
24313        afz: 0.0_f32,
24314        yaw: 0.0_f32,
24315        yaw_rate: 0.0_f32,
24316        type_mask: PositionTargetTypemask::DEFAULT,
24317        coordinate_frame: MavFrame::DEFAULT,
24318    };
24319    #[cfg(feature = "arbitrary")]
24320    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24321        use arbitrary::{Arbitrary, Unstructured};
24322        let mut buf = [0u8; 1024];
24323        rng.fill_bytes(&mut buf);
24324        let mut unstructured = Unstructured::new(&buf);
24325        Self::arbitrary(&mut unstructured).unwrap_or_default()
24326    }
24327}
24328impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
24329    fn default() -> Self {
24330        Self::DEFAULT.clone()
24331    }
24332}
24333impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
24334    type Message = MavMessage;
24335    const ID: u32 = 87u32;
24336    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
24337    const EXTRA_CRC: u8 = 150u8;
24338    const ENCODED_LEN: usize = 51usize;
24339    fn deser(
24340        _version: MavlinkVersion,
24341        __input: &[u8],
24342    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24343        let avail_len = __input.len();
24344        let mut payload_buf = [0; Self::ENCODED_LEN];
24345        let mut buf = if avail_len < Self::ENCODED_LEN {
24346            payload_buf[0..avail_len].copy_from_slice(__input);
24347            Bytes::new(&payload_buf)
24348        } else {
24349            Bytes::new(__input)
24350        };
24351        let mut __struct = Self::default();
24352        __struct.time_boot_ms = buf.get_u32_le();
24353        __struct.lat_int = buf.get_i32_le();
24354        __struct.lon_int = buf.get_i32_le();
24355        __struct.alt = buf.get_f32_le();
24356        __struct.vx = buf.get_f32_le();
24357        __struct.vy = buf.get_f32_le();
24358        __struct.vz = buf.get_f32_le();
24359        __struct.afx = buf.get_f32_le();
24360        __struct.afy = buf.get_f32_le();
24361        __struct.afz = buf.get_f32_le();
24362        __struct.yaw = buf.get_f32_le();
24363        __struct.yaw_rate = buf.get_f32_le();
24364        let tmp = buf.get_u16_le();
24365        __struct.type_mask = PositionTargetTypemask::from_bits(
24366            tmp & PositionTargetTypemask::all().bits(),
24367        )
24368        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24369            flag_type: "PositionTargetTypemask",
24370            value: tmp as u32,
24371        })?;
24372        let tmp = buf.get_u8();
24373        __struct.coordinate_frame =
24374            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24375                enum_type: "MavFrame",
24376                value: tmp as u32,
24377            })?;
24378        Ok(__struct)
24379    }
24380    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24381        let mut __tmp = BytesMut::new(bytes);
24382        #[allow(clippy::absurd_extreme_comparisons)]
24383        #[allow(unused_comparisons)]
24384        if __tmp.remaining() < Self::ENCODED_LEN {
24385            panic!(
24386                "buffer is too small (need {} bytes, but got {})",
24387                Self::ENCODED_LEN,
24388                __tmp.remaining(),
24389            )
24390        }
24391        __tmp.put_u32_le(self.time_boot_ms);
24392        __tmp.put_i32_le(self.lat_int);
24393        __tmp.put_i32_le(self.lon_int);
24394        __tmp.put_f32_le(self.alt);
24395        __tmp.put_f32_le(self.vx);
24396        __tmp.put_f32_le(self.vy);
24397        __tmp.put_f32_le(self.vz);
24398        __tmp.put_f32_le(self.afx);
24399        __tmp.put_f32_le(self.afy);
24400        __tmp.put_f32_le(self.afz);
24401        __tmp.put_f32_le(self.yaw);
24402        __tmp.put_f32_le(self.yaw_rate);
24403        __tmp.put_u16_le(self.type_mask.bits());
24404        __tmp.put_u8(self.coordinate_frame as u8);
24405        if matches!(version, MavlinkVersion::V2) {
24406            let len = __tmp.len();
24407            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24408        } else {
24409            __tmp.len()
24410        }
24411    }
24412}
24413#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
24414#[doc = ""]
24415#[doc = "ID: 85"]
24416#[derive(Debug, Clone, PartialEq)]
24417#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24418#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24419#[cfg_attr(feature = "ts", derive(TS))]
24420#[cfg_attr(feature = "ts", ts(export))]
24421pub struct POSITION_TARGET_LOCAL_NED_DATA {
24422    #[doc = "Timestamp (time since system boot)."]
24423    pub time_boot_ms: u32,
24424    #[doc = "X Position in NED frame"]
24425    pub x: f32,
24426    #[doc = "Y Position in NED frame"]
24427    pub y: f32,
24428    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
24429    pub z: f32,
24430    #[doc = "X velocity in NED frame"]
24431    pub vx: f32,
24432    #[doc = "Y velocity in NED frame"]
24433    pub vy: f32,
24434    #[doc = "Z velocity in NED frame"]
24435    pub vz: f32,
24436    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24437    pub afx: f32,
24438    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24439    pub afy: f32,
24440    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24441    pub afz: f32,
24442    #[doc = "yaw setpoint"]
24443    pub yaw: f32,
24444    #[doc = "yaw rate setpoint"]
24445    pub yaw_rate: f32,
24446    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24447    pub type_mask: PositionTargetTypemask,
24448    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
24449    pub coordinate_frame: MavFrame,
24450}
24451impl POSITION_TARGET_LOCAL_NED_DATA {
24452    pub const ENCODED_LEN: usize = 51usize;
24453    pub const DEFAULT: Self = Self {
24454        time_boot_ms: 0_u32,
24455        x: 0.0_f32,
24456        y: 0.0_f32,
24457        z: 0.0_f32,
24458        vx: 0.0_f32,
24459        vy: 0.0_f32,
24460        vz: 0.0_f32,
24461        afx: 0.0_f32,
24462        afy: 0.0_f32,
24463        afz: 0.0_f32,
24464        yaw: 0.0_f32,
24465        yaw_rate: 0.0_f32,
24466        type_mask: PositionTargetTypemask::DEFAULT,
24467        coordinate_frame: MavFrame::DEFAULT,
24468    };
24469    #[cfg(feature = "arbitrary")]
24470    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24471        use arbitrary::{Arbitrary, Unstructured};
24472        let mut buf = [0u8; 1024];
24473        rng.fill_bytes(&mut buf);
24474        let mut unstructured = Unstructured::new(&buf);
24475        Self::arbitrary(&mut unstructured).unwrap_or_default()
24476    }
24477}
24478impl Default for POSITION_TARGET_LOCAL_NED_DATA {
24479    fn default() -> Self {
24480        Self::DEFAULT.clone()
24481    }
24482}
24483impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
24484    type Message = MavMessage;
24485    const ID: u32 = 85u32;
24486    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
24487    const EXTRA_CRC: u8 = 140u8;
24488    const ENCODED_LEN: usize = 51usize;
24489    fn deser(
24490        _version: MavlinkVersion,
24491        __input: &[u8],
24492    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24493        let avail_len = __input.len();
24494        let mut payload_buf = [0; Self::ENCODED_LEN];
24495        let mut buf = if avail_len < Self::ENCODED_LEN {
24496            payload_buf[0..avail_len].copy_from_slice(__input);
24497            Bytes::new(&payload_buf)
24498        } else {
24499            Bytes::new(__input)
24500        };
24501        let mut __struct = Self::default();
24502        __struct.time_boot_ms = buf.get_u32_le();
24503        __struct.x = buf.get_f32_le();
24504        __struct.y = buf.get_f32_le();
24505        __struct.z = buf.get_f32_le();
24506        __struct.vx = buf.get_f32_le();
24507        __struct.vy = buf.get_f32_le();
24508        __struct.vz = buf.get_f32_le();
24509        __struct.afx = buf.get_f32_le();
24510        __struct.afy = buf.get_f32_le();
24511        __struct.afz = buf.get_f32_le();
24512        __struct.yaw = buf.get_f32_le();
24513        __struct.yaw_rate = buf.get_f32_le();
24514        let tmp = buf.get_u16_le();
24515        __struct.type_mask = PositionTargetTypemask::from_bits(
24516            tmp & PositionTargetTypemask::all().bits(),
24517        )
24518        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24519            flag_type: "PositionTargetTypemask",
24520            value: tmp as u32,
24521        })?;
24522        let tmp = buf.get_u8();
24523        __struct.coordinate_frame =
24524            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24525                enum_type: "MavFrame",
24526                value: tmp as u32,
24527            })?;
24528        Ok(__struct)
24529    }
24530    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24531        let mut __tmp = BytesMut::new(bytes);
24532        #[allow(clippy::absurd_extreme_comparisons)]
24533        #[allow(unused_comparisons)]
24534        if __tmp.remaining() < Self::ENCODED_LEN {
24535            panic!(
24536                "buffer is too small (need {} bytes, but got {})",
24537                Self::ENCODED_LEN,
24538                __tmp.remaining(),
24539            )
24540        }
24541        __tmp.put_u32_le(self.time_boot_ms);
24542        __tmp.put_f32_le(self.x);
24543        __tmp.put_f32_le(self.y);
24544        __tmp.put_f32_le(self.z);
24545        __tmp.put_f32_le(self.vx);
24546        __tmp.put_f32_le(self.vy);
24547        __tmp.put_f32_le(self.vz);
24548        __tmp.put_f32_le(self.afx);
24549        __tmp.put_f32_le(self.afy);
24550        __tmp.put_f32_le(self.afz);
24551        __tmp.put_f32_le(self.yaw);
24552        __tmp.put_f32_le(self.yaw_rate);
24553        __tmp.put_u16_le(self.type_mask.bits());
24554        __tmp.put_u8(self.coordinate_frame as u8);
24555        if matches!(version, MavlinkVersion::V2) {
24556            let len = __tmp.len();
24557            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24558        } else {
24559            __tmp.len()
24560        }
24561    }
24562}
24563#[doc = "Power supply status."]
24564#[doc = ""]
24565#[doc = "ID: 125"]
24566#[derive(Debug, Clone, PartialEq)]
24567#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24568#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24569#[cfg_attr(feature = "ts", derive(TS))]
24570#[cfg_attr(feature = "ts", ts(export))]
24571pub struct POWER_STATUS_DATA {
24572    #[doc = "5V rail voltage."]
24573    pub Vcc: u16,
24574    #[doc = "Servo rail voltage."]
24575    pub Vservo: u16,
24576    #[doc = "Bitmap of power supply status flags."]
24577    pub flags: MavPowerStatus,
24578}
24579impl POWER_STATUS_DATA {
24580    pub const ENCODED_LEN: usize = 6usize;
24581    pub const DEFAULT: Self = Self {
24582        Vcc: 0_u16,
24583        Vservo: 0_u16,
24584        flags: MavPowerStatus::DEFAULT,
24585    };
24586    #[cfg(feature = "arbitrary")]
24587    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24588        use arbitrary::{Arbitrary, Unstructured};
24589        let mut buf = [0u8; 1024];
24590        rng.fill_bytes(&mut buf);
24591        let mut unstructured = Unstructured::new(&buf);
24592        Self::arbitrary(&mut unstructured).unwrap_or_default()
24593    }
24594}
24595impl Default for POWER_STATUS_DATA {
24596    fn default() -> Self {
24597        Self::DEFAULT.clone()
24598    }
24599}
24600impl MessageData for POWER_STATUS_DATA {
24601    type Message = MavMessage;
24602    const ID: u32 = 125u32;
24603    const NAME: &'static str = "POWER_STATUS";
24604    const EXTRA_CRC: u8 = 203u8;
24605    const ENCODED_LEN: usize = 6usize;
24606    fn deser(
24607        _version: MavlinkVersion,
24608        __input: &[u8],
24609    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24610        let avail_len = __input.len();
24611        let mut payload_buf = [0; Self::ENCODED_LEN];
24612        let mut buf = if avail_len < Self::ENCODED_LEN {
24613            payload_buf[0..avail_len].copy_from_slice(__input);
24614            Bytes::new(&payload_buf)
24615        } else {
24616            Bytes::new(__input)
24617        };
24618        let mut __struct = Self::default();
24619        __struct.Vcc = buf.get_u16_le();
24620        __struct.Vservo = buf.get_u16_le();
24621        let tmp = buf.get_u16_le();
24622        __struct.flags = MavPowerStatus::from_bits(tmp & MavPowerStatus::all().bits()).ok_or(
24623            ::mavlink_core::error::ParserError::InvalidFlag {
24624                flag_type: "MavPowerStatus",
24625                value: tmp as u32,
24626            },
24627        )?;
24628        Ok(__struct)
24629    }
24630    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24631        let mut __tmp = BytesMut::new(bytes);
24632        #[allow(clippy::absurd_extreme_comparisons)]
24633        #[allow(unused_comparisons)]
24634        if __tmp.remaining() < Self::ENCODED_LEN {
24635            panic!(
24636                "buffer is too small (need {} bytes, but got {})",
24637                Self::ENCODED_LEN,
24638                __tmp.remaining(),
24639            )
24640        }
24641        __tmp.put_u16_le(self.Vcc);
24642        __tmp.put_u16_le(self.Vservo);
24643        __tmp.put_u16_le(self.flags.bits());
24644        if matches!(version, MavlinkVersion::V2) {
24645            let len = __tmp.len();
24646            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24647        } else {
24648            __tmp.len()
24649        }
24650    }
24651}
24652#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
24653#[doc = ""]
24654#[doc = "ID: 300"]
24655#[derive(Debug, Clone, PartialEq)]
24656#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24657#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24658#[cfg_attr(feature = "ts", derive(TS))]
24659#[cfg_attr(feature = "ts", ts(export))]
24660pub struct PROTOCOL_VERSION_DATA {
24661    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
24662    pub version: u16,
24663    #[doc = "Minimum MAVLink version supported"]
24664    pub min_version: u16,
24665    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
24666    pub max_version: u16,
24667    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24668    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24669    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24670    pub spec_version_hash: [u8; 8],
24671    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24672    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24673    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24674    pub library_version_hash: [u8; 8],
24675}
24676impl PROTOCOL_VERSION_DATA {
24677    pub const ENCODED_LEN: usize = 22usize;
24678    pub const DEFAULT: Self = Self {
24679        version: 0_u16,
24680        min_version: 0_u16,
24681        max_version: 0_u16,
24682        spec_version_hash: [0_u8; 8usize],
24683        library_version_hash: [0_u8; 8usize],
24684    };
24685    #[cfg(feature = "arbitrary")]
24686    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24687        use arbitrary::{Arbitrary, Unstructured};
24688        let mut buf = [0u8; 1024];
24689        rng.fill_bytes(&mut buf);
24690        let mut unstructured = Unstructured::new(&buf);
24691        Self::arbitrary(&mut unstructured).unwrap_or_default()
24692    }
24693}
24694impl Default for PROTOCOL_VERSION_DATA {
24695    fn default() -> Self {
24696        Self::DEFAULT.clone()
24697    }
24698}
24699impl MessageData for PROTOCOL_VERSION_DATA {
24700    type Message = MavMessage;
24701    const ID: u32 = 300u32;
24702    const NAME: &'static str = "PROTOCOL_VERSION";
24703    const EXTRA_CRC: u8 = 217u8;
24704    const ENCODED_LEN: usize = 22usize;
24705    fn deser(
24706        _version: MavlinkVersion,
24707        __input: &[u8],
24708    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24709        let avail_len = __input.len();
24710        let mut payload_buf = [0; Self::ENCODED_LEN];
24711        let mut buf = if avail_len < Self::ENCODED_LEN {
24712            payload_buf[0..avail_len].copy_from_slice(__input);
24713            Bytes::new(&payload_buf)
24714        } else {
24715            Bytes::new(__input)
24716        };
24717        let mut __struct = Self::default();
24718        __struct.version = buf.get_u16_le();
24719        __struct.min_version = buf.get_u16_le();
24720        __struct.max_version = buf.get_u16_le();
24721        for v in &mut __struct.spec_version_hash {
24722            let val = buf.get_u8();
24723            *v = val;
24724        }
24725        for v in &mut __struct.library_version_hash {
24726            let val = buf.get_u8();
24727            *v = val;
24728        }
24729        Ok(__struct)
24730    }
24731    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24732        let mut __tmp = BytesMut::new(bytes);
24733        #[allow(clippy::absurd_extreme_comparisons)]
24734        #[allow(unused_comparisons)]
24735        if __tmp.remaining() < Self::ENCODED_LEN {
24736            panic!(
24737                "buffer is too small (need {} bytes, but got {})",
24738                Self::ENCODED_LEN,
24739                __tmp.remaining(),
24740            )
24741        }
24742        __tmp.put_u16_le(self.version);
24743        __tmp.put_u16_le(self.min_version);
24744        __tmp.put_u16_le(self.max_version);
24745        for val in &self.spec_version_hash {
24746            __tmp.put_u8(*val);
24747        }
24748        for val in &self.library_version_hash {
24749            __tmp.put_u8(*val);
24750        }
24751        if matches!(version, MavlinkVersion::V2) {
24752            let len = __tmp.len();
24753            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24754        } else {
24755            __tmp.len()
24756        }
24757    }
24758}
24759#[doc = "Status generated by radio and injected into MAVLink stream."]
24760#[doc = ""]
24761#[doc = "ID: 109"]
24762#[derive(Debug, Clone, PartialEq)]
24763#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24764#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24765#[cfg_attr(feature = "ts", derive(TS))]
24766#[cfg_attr(feature = "ts", ts(export))]
24767pub struct RADIO_STATUS_DATA {
24768    #[doc = "Count of radio packet receive errors (since boot)."]
24769    pub rxerrors: u16,
24770    #[doc = "Count of error corrected radio packets (since boot)."]
24771    pub fixed: u16,
24772    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24773    pub rssi: u8,
24774    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24775    pub remrssi: u8,
24776    #[doc = "Remaining free transmitter buffer space."]
24777    pub txbuf: u8,
24778    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
24779    pub noise: u8,
24780    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
24781    pub remnoise: u8,
24782}
24783impl RADIO_STATUS_DATA {
24784    pub const ENCODED_LEN: usize = 9usize;
24785    pub const DEFAULT: Self = Self {
24786        rxerrors: 0_u16,
24787        fixed: 0_u16,
24788        rssi: 0_u8,
24789        remrssi: 0_u8,
24790        txbuf: 0_u8,
24791        noise: 0_u8,
24792        remnoise: 0_u8,
24793    };
24794    #[cfg(feature = "arbitrary")]
24795    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24796        use arbitrary::{Arbitrary, Unstructured};
24797        let mut buf = [0u8; 1024];
24798        rng.fill_bytes(&mut buf);
24799        let mut unstructured = Unstructured::new(&buf);
24800        Self::arbitrary(&mut unstructured).unwrap_or_default()
24801    }
24802}
24803impl Default for RADIO_STATUS_DATA {
24804    fn default() -> Self {
24805        Self::DEFAULT.clone()
24806    }
24807}
24808impl MessageData for RADIO_STATUS_DATA {
24809    type Message = MavMessage;
24810    const ID: u32 = 109u32;
24811    const NAME: &'static str = "RADIO_STATUS";
24812    const EXTRA_CRC: u8 = 185u8;
24813    const ENCODED_LEN: usize = 9usize;
24814    fn deser(
24815        _version: MavlinkVersion,
24816        __input: &[u8],
24817    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24818        let avail_len = __input.len();
24819        let mut payload_buf = [0; Self::ENCODED_LEN];
24820        let mut buf = if avail_len < Self::ENCODED_LEN {
24821            payload_buf[0..avail_len].copy_from_slice(__input);
24822            Bytes::new(&payload_buf)
24823        } else {
24824            Bytes::new(__input)
24825        };
24826        let mut __struct = Self::default();
24827        __struct.rxerrors = buf.get_u16_le();
24828        __struct.fixed = buf.get_u16_le();
24829        __struct.rssi = buf.get_u8();
24830        __struct.remrssi = buf.get_u8();
24831        __struct.txbuf = buf.get_u8();
24832        __struct.noise = buf.get_u8();
24833        __struct.remnoise = buf.get_u8();
24834        Ok(__struct)
24835    }
24836    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24837        let mut __tmp = BytesMut::new(bytes);
24838        #[allow(clippy::absurd_extreme_comparisons)]
24839        #[allow(unused_comparisons)]
24840        if __tmp.remaining() < Self::ENCODED_LEN {
24841            panic!(
24842                "buffer is too small (need {} bytes, but got {})",
24843                Self::ENCODED_LEN,
24844                __tmp.remaining(),
24845            )
24846        }
24847        __tmp.put_u16_le(self.rxerrors);
24848        __tmp.put_u16_le(self.fixed);
24849        __tmp.put_u8(self.rssi);
24850        __tmp.put_u8(self.remrssi);
24851        __tmp.put_u8(self.txbuf);
24852        __tmp.put_u8(self.noise);
24853        __tmp.put_u8(self.remnoise);
24854        if matches!(version, MavlinkVersion::V2) {
24855            let len = __tmp.len();
24856            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24857        } else {
24858            __tmp.len()
24859        }
24860    }
24861}
24862#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
24863#[doc = ""]
24864#[doc = "ID: 27"]
24865#[derive(Debug, Clone, PartialEq)]
24866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24867#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24868#[cfg_attr(feature = "ts", derive(TS))]
24869#[cfg_attr(feature = "ts", ts(export))]
24870pub struct RAW_IMU_DATA {
24871    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24872    pub time_usec: u64,
24873    #[doc = "X acceleration (raw)"]
24874    pub xacc: i16,
24875    #[doc = "Y acceleration (raw)"]
24876    pub yacc: i16,
24877    #[doc = "Z acceleration (raw)"]
24878    pub zacc: i16,
24879    #[doc = "Angular speed around X axis (raw)"]
24880    pub xgyro: i16,
24881    #[doc = "Angular speed around Y axis (raw)"]
24882    pub ygyro: i16,
24883    #[doc = "Angular speed around Z axis (raw)"]
24884    pub zgyro: i16,
24885    #[doc = "X Magnetic field (raw)"]
24886    pub xmag: i16,
24887    #[doc = "Y Magnetic field (raw)"]
24888    pub ymag: i16,
24889    #[doc = "Z Magnetic field (raw)"]
24890    pub zmag: i16,
24891    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
24892    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24893    pub id: u8,
24894    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
24895    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24896    pub temperature: i16,
24897}
24898impl RAW_IMU_DATA {
24899    pub const ENCODED_LEN: usize = 29usize;
24900    pub const DEFAULT: Self = Self {
24901        time_usec: 0_u64,
24902        xacc: 0_i16,
24903        yacc: 0_i16,
24904        zacc: 0_i16,
24905        xgyro: 0_i16,
24906        ygyro: 0_i16,
24907        zgyro: 0_i16,
24908        xmag: 0_i16,
24909        ymag: 0_i16,
24910        zmag: 0_i16,
24911        id: 0_u8,
24912        temperature: 0_i16,
24913    };
24914    #[cfg(feature = "arbitrary")]
24915    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24916        use arbitrary::{Arbitrary, Unstructured};
24917        let mut buf = [0u8; 1024];
24918        rng.fill_bytes(&mut buf);
24919        let mut unstructured = Unstructured::new(&buf);
24920        Self::arbitrary(&mut unstructured).unwrap_or_default()
24921    }
24922}
24923impl Default for RAW_IMU_DATA {
24924    fn default() -> Self {
24925        Self::DEFAULT.clone()
24926    }
24927}
24928impl MessageData for RAW_IMU_DATA {
24929    type Message = MavMessage;
24930    const ID: u32 = 27u32;
24931    const NAME: &'static str = "RAW_IMU";
24932    const EXTRA_CRC: u8 = 144u8;
24933    const ENCODED_LEN: usize = 29usize;
24934    fn deser(
24935        _version: MavlinkVersion,
24936        __input: &[u8],
24937    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24938        let avail_len = __input.len();
24939        let mut payload_buf = [0; Self::ENCODED_LEN];
24940        let mut buf = if avail_len < Self::ENCODED_LEN {
24941            payload_buf[0..avail_len].copy_from_slice(__input);
24942            Bytes::new(&payload_buf)
24943        } else {
24944            Bytes::new(__input)
24945        };
24946        let mut __struct = Self::default();
24947        __struct.time_usec = buf.get_u64_le();
24948        __struct.xacc = buf.get_i16_le();
24949        __struct.yacc = buf.get_i16_le();
24950        __struct.zacc = buf.get_i16_le();
24951        __struct.xgyro = buf.get_i16_le();
24952        __struct.ygyro = buf.get_i16_le();
24953        __struct.zgyro = buf.get_i16_le();
24954        __struct.xmag = buf.get_i16_le();
24955        __struct.ymag = buf.get_i16_le();
24956        __struct.zmag = buf.get_i16_le();
24957        __struct.id = buf.get_u8();
24958        __struct.temperature = buf.get_i16_le();
24959        Ok(__struct)
24960    }
24961    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24962        let mut __tmp = BytesMut::new(bytes);
24963        #[allow(clippy::absurd_extreme_comparisons)]
24964        #[allow(unused_comparisons)]
24965        if __tmp.remaining() < Self::ENCODED_LEN {
24966            panic!(
24967                "buffer is too small (need {} bytes, but got {})",
24968                Self::ENCODED_LEN,
24969                __tmp.remaining(),
24970            )
24971        }
24972        __tmp.put_u64_le(self.time_usec);
24973        __tmp.put_i16_le(self.xacc);
24974        __tmp.put_i16_le(self.yacc);
24975        __tmp.put_i16_le(self.zacc);
24976        __tmp.put_i16_le(self.xgyro);
24977        __tmp.put_i16_le(self.ygyro);
24978        __tmp.put_i16_le(self.zgyro);
24979        __tmp.put_i16_le(self.xmag);
24980        __tmp.put_i16_le(self.ymag);
24981        __tmp.put_i16_le(self.zmag);
24982        if matches!(version, MavlinkVersion::V2) {
24983            __tmp.put_u8(self.id);
24984            __tmp.put_i16_le(self.temperature);
24985            let len = __tmp.len();
24986            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24987        } else {
24988            __tmp.len()
24989        }
24990    }
24991}
24992#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
24993#[doc = ""]
24994#[doc = "ID: 28"]
24995#[derive(Debug, Clone, PartialEq)]
24996#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24997#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24998#[cfg_attr(feature = "ts", derive(TS))]
24999#[cfg_attr(feature = "ts", ts(export))]
25000pub struct RAW_PRESSURE_DATA {
25001    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25002    pub time_usec: u64,
25003    #[doc = "Absolute pressure (raw)"]
25004    pub press_abs: i16,
25005    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
25006    pub press_diff1: i16,
25007    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
25008    pub press_diff2: i16,
25009    #[doc = "Raw Temperature measurement (raw)"]
25010    pub temperature: i16,
25011}
25012impl RAW_PRESSURE_DATA {
25013    pub const ENCODED_LEN: usize = 16usize;
25014    pub const DEFAULT: Self = Self {
25015        time_usec: 0_u64,
25016        press_abs: 0_i16,
25017        press_diff1: 0_i16,
25018        press_diff2: 0_i16,
25019        temperature: 0_i16,
25020    };
25021    #[cfg(feature = "arbitrary")]
25022    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25023        use arbitrary::{Arbitrary, Unstructured};
25024        let mut buf = [0u8; 1024];
25025        rng.fill_bytes(&mut buf);
25026        let mut unstructured = Unstructured::new(&buf);
25027        Self::arbitrary(&mut unstructured).unwrap_or_default()
25028    }
25029}
25030impl Default for RAW_PRESSURE_DATA {
25031    fn default() -> Self {
25032        Self::DEFAULT.clone()
25033    }
25034}
25035impl MessageData for RAW_PRESSURE_DATA {
25036    type Message = MavMessage;
25037    const ID: u32 = 28u32;
25038    const NAME: &'static str = "RAW_PRESSURE";
25039    const EXTRA_CRC: u8 = 67u8;
25040    const ENCODED_LEN: usize = 16usize;
25041    fn deser(
25042        _version: MavlinkVersion,
25043        __input: &[u8],
25044    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25045        let avail_len = __input.len();
25046        let mut payload_buf = [0; Self::ENCODED_LEN];
25047        let mut buf = if avail_len < Self::ENCODED_LEN {
25048            payload_buf[0..avail_len].copy_from_slice(__input);
25049            Bytes::new(&payload_buf)
25050        } else {
25051            Bytes::new(__input)
25052        };
25053        let mut __struct = Self::default();
25054        __struct.time_usec = buf.get_u64_le();
25055        __struct.press_abs = buf.get_i16_le();
25056        __struct.press_diff1 = buf.get_i16_le();
25057        __struct.press_diff2 = buf.get_i16_le();
25058        __struct.temperature = buf.get_i16_le();
25059        Ok(__struct)
25060    }
25061    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25062        let mut __tmp = BytesMut::new(bytes);
25063        #[allow(clippy::absurd_extreme_comparisons)]
25064        #[allow(unused_comparisons)]
25065        if __tmp.remaining() < Self::ENCODED_LEN {
25066            panic!(
25067                "buffer is too small (need {} bytes, but got {})",
25068                Self::ENCODED_LEN,
25069                __tmp.remaining(),
25070            )
25071        }
25072        __tmp.put_u64_le(self.time_usec);
25073        __tmp.put_i16_le(self.press_abs);
25074        __tmp.put_i16_le(self.press_diff1);
25075        __tmp.put_i16_le(self.press_diff2);
25076        __tmp.put_i16_le(self.temperature);
25077        if matches!(version, MavlinkVersion::V2) {
25078            let len = __tmp.len();
25079            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25080        } else {
25081            __tmp.len()
25082        }
25083    }
25084}
25085#[doc = "RPM sensor data message."]
25086#[doc = ""]
25087#[doc = "ID: 339"]
25088#[derive(Debug, Clone, PartialEq)]
25089#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25090#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25091#[cfg_attr(feature = "ts", derive(TS))]
25092#[cfg_attr(feature = "ts", ts(export))]
25093pub struct RAW_RPM_DATA {
25094    #[doc = "Indicated rate"]
25095    pub frequency: f32,
25096    #[doc = "Index of this RPM sensor (0-indexed)"]
25097    pub index: u8,
25098}
25099impl RAW_RPM_DATA {
25100    pub const ENCODED_LEN: usize = 5usize;
25101    pub const DEFAULT: Self = Self {
25102        frequency: 0.0_f32,
25103        index: 0_u8,
25104    };
25105    #[cfg(feature = "arbitrary")]
25106    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25107        use arbitrary::{Arbitrary, Unstructured};
25108        let mut buf = [0u8; 1024];
25109        rng.fill_bytes(&mut buf);
25110        let mut unstructured = Unstructured::new(&buf);
25111        Self::arbitrary(&mut unstructured).unwrap_or_default()
25112    }
25113}
25114impl Default for RAW_RPM_DATA {
25115    fn default() -> Self {
25116        Self::DEFAULT.clone()
25117    }
25118}
25119impl MessageData for RAW_RPM_DATA {
25120    type Message = MavMessage;
25121    const ID: u32 = 339u32;
25122    const NAME: &'static str = "RAW_RPM";
25123    const EXTRA_CRC: u8 = 199u8;
25124    const ENCODED_LEN: usize = 5usize;
25125    fn deser(
25126        _version: MavlinkVersion,
25127        __input: &[u8],
25128    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25129        let avail_len = __input.len();
25130        let mut payload_buf = [0; Self::ENCODED_LEN];
25131        let mut buf = if avail_len < Self::ENCODED_LEN {
25132            payload_buf[0..avail_len].copy_from_slice(__input);
25133            Bytes::new(&payload_buf)
25134        } else {
25135            Bytes::new(__input)
25136        };
25137        let mut __struct = Self::default();
25138        __struct.frequency = buf.get_f32_le();
25139        __struct.index = buf.get_u8();
25140        Ok(__struct)
25141    }
25142    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25143        let mut __tmp = BytesMut::new(bytes);
25144        #[allow(clippy::absurd_extreme_comparisons)]
25145        #[allow(unused_comparisons)]
25146        if __tmp.remaining() < Self::ENCODED_LEN {
25147            panic!(
25148                "buffer is too small (need {} bytes, but got {})",
25149                Self::ENCODED_LEN,
25150                __tmp.remaining(),
25151            )
25152        }
25153        __tmp.put_f32_le(self.frequency);
25154        __tmp.put_u8(self.index);
25155        if matches!(version, MavlinkVersion::V2) {
25156            let len = __tmp.len();
25157            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25158        } else {
25159            __tmp.len()
25160        }
25161    }
25162}
25163#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25164#[doc = ""]
25165#[doc = "ID: 65"]
25166#[derive(Debug, Clone, PartialEq)]
25167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25169#[cfg_attr(feature = "ts", derive(TS))]
25170#[cfg_attr(feature = "ts", ts(export))]
25171pub struct RC_CHANNELS_DATA {
25172    #[doc = "Timestamp (time since system boot)."]
25173    pub time_boot_ms: u32,
25174    #[doc = "RC channel 1 value."]
25175    pub chan1_raw: u16,
25176    #[doc = "RC channel 2 value."]
25177    pub chan2_raw: u16,
25178    #[doc = "RC channel 3 value."]
25179    pub chan3_raw: u16,
25180    #[doc = "RC channel 4 value."]
25181    pub chan4_raw: u16,
25182    #[doc = "RC channel 5 value."]
25183    pub chan5_raw: u16,
25184    #[doc = "RC channel 6 value."]
25185    pub chan6_raw: u16,
25186    #[doc = "RC channel 7 value."]
25187    pub chan7_raw: u16,
25188    #[doc = "RC channel 8 value."]
25189    pub chan8_raw: u16,
25190    #[doc = "RC channel 9 value."]
25191    pub chan9_raw: u16,
25192    #[doc = "RC channel 10 value."]
25193    pub chan10_raw: u16,
25194    #[doc = "RC channel 11 value."]
25195    pub chan11_raw: u16,
25196    #[doc = "RC channel 12 value."]
25197    pub chan12_raw: u16,
25198    #[doc = "RC channel 13 value."]
25199    pub chan13_raw: u16,
25200    #[doc = "RC channel 14 value."]
25201    pub chan14_raw: u16,
25202    #[doc = "RC channel 15 value."]
25203    pub chan15_raw: u16,
25204    #[doc = "RC channel 16 value."]
25205    pub chan16_raw: u16,
25206    #[doc = "RC channel 17 value."]
25207    pub chan17_raw: u16,
25208    #[doc = "RC channel 18 value."]
25209    pub chan18_raw: u16,
25210    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
25211    pub chancount: u8,
25212    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25213    pub rssi: u8,
25214}
25215impl RC_CHANNELS_DATA {
25216    pub const ENCODED_LEN: usize = 42usize;
25217    pub const DEFAULT: Self = Self {
25218        time_boot_ms: 0_u32,
25219        chan1_raw: 0_u16,
25220        chan2_raw: 0_u16,
25221        chan3_raw: 0_u16,
25222        chan4_raw: 0_u16,
25223        chan5_raw: 0_u16,
25224        chan6_raw: 0_u16,
25225        chan7_raw: 0_u16,
25226        chan8_raw: 0_u16,
25227        chan9_raw: 0_u16,
25228        chan10_raw: 0_u16,
25229        chan11_raw: 0_u16,
25230        chan12_raw: 0_u16,
25231        chan13_raw: 0_u16,
25232        chan14_raw: 0_u16,
25233        chan15_raw: 0_u16,
25234        chan16_raw: 0_u16,
25235        chan17_raw: 0_u16,
25236        chan18_raw: 0_u16,
25237        chancount: 0_u8,
25238        rssi: 0_u8,
25239    };
25240    #[cfg(feature = "arbitrary")]
25241    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25242        use arbitrary::{Arbitrary, Unstructured};
25243        let mut buf = [0u8; 1024];
25244        rng.fill_bytes(&mut buf);
25245        let mut unstructured = Unstructured::new(&buf);
25246        Self::arbitrary(&mut unstructured).unwrap_or_default()
25247    }
25248}
25249impl Default for RC_CHANNELS_DATA {
25250    fn default() -> Self {
25251        Self::DEFAULT.clone()
25252    }
25253}
25254impl MessageData for RC_CHANNELS_DATA {
25255    type Message = MavMessage;
25256    const ID: u32 = 65u32;
25257    const NAME: &'static str = "RC_CHANNELS";
25258    const EXTRA_CRC: u8 = 118u8;
25259    const ENCODED_LEN: usize = 42usize;
25260    fn deser(
25261        _version: MavlinkVersion,
25262        __input: &[u8],
25263    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25264        let avail_len = __input.len();
25265        let mut payload_buf = [0; Self::ENCODED_LEN];
25266        let mut buf = if avail_len < Self::ENCODED_LEN {
25267            payload_buf[0..avail_len].copy_from_slice(__input);
25268            Bytes::new(&payload_buf)
25269        } else {
25270            Bytes::new(__input)
25271        };
25272        let mut __struct = Self::default();
25273        __struct.time_boot_ms = buf.get_u32_le();
25274        __struct.chan1_raw = buf.get_u16_le();
25275        __struct.chan2_raw = buf.get_u16_le();
25276        __struct.chan3_raw = buf.get_u16_le();
25277        __struct.chan4_raw = buf.get_u16_le();
25278        __struct.chan5_raw = buf.get_u16_le();
25279        __struct.chan6_raw = buf.get_u16_le();
25280        __struct.chan7_raw = buf.get_u16_le();
25281        __struct.chan8_raw = buf.get_u16_le();
25282        __struct.chan9_raw = buf.get_u16_le();
25283        __struct.chan10_raw = buf.get_u16_le();
25284        __struct.chan11_raw = buf.get_u16_le();
25285        __struct.chan12_raw = buf.get_u16_le();
25286        __struct.chan13_raw = buf.get_u16_le();
25287        __struct.chan14_raw = buf.get_u16_le();
25288        __struct.chan15_raw = buf.get_u16_le();
25289        __struct.chan16_raw = buf.get_u16_le();
25290        __struct.chan17_raw = buf.get_u16_le();
25291        __struct.chan18_raw = buf.get_u16_le();
25292        __struct.chancount = buf.get_u8();
25293        __struct.rssi = buf.get_u8();
25294        Ok(__struct)
25295    }
25296    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25297        let mut __tmp = BytesMut::new(bytes);
25298        #[allow(clippy::absurd_extreme_comparisons)]
25299        #[allow(unused_comparisons)]
25300        if __tmp.remaining() < Self::ENCODED_LEN {
25301            panic!(
25302                "buffer is too small (need {} bytes, but got {})",
25303                Self::ENCODED_LEN,
25304                __tmp.remaining(),
25305            )
25306        }
25307        __tmp.put_u32_le(self.time_boot_ms);
25308        __tmp.put_u16_le(self.chan1_raw);
25309        __tmp.put_u16_le(self.chan2_raw);
25310        __tmp.put_u16_le(self.chan3_raw);
25311        __tmp.put_u16_le(self.chan4_raw);
25312        __tmp.put_u16_le(self.chan5_raw);
25313        __tmp.put_u16_le(self.chan6_raw);
25314        __tmp.put_u16_le(self.chan7_raw);
25315        __tmp.put_u16_le(self.chan8_raw);
25316        __tmp.put_u16_le(self.chan9_raw);
25317        __tmp.put_u16_le(self.chan10_raw);
25318        __tmp.put_u16_le(self.chan11_raw);
25319        __tmp.put_u16_le(self.chan12_raw);
25320        __tmp.put_u16_le(self.chan13_raw);
25321        __tmp.put_u16_le(self.chan14_raw);
25322        __tmp.put_u16_le(self.chan15_raw);
25323        __tmp.put_u16_le(self.chan16_raw);
25324        __tmp.put_u16_le(self.chan17_raw);
25325        __tmp.put_u16_le(self.chan18_raw);
25326        __tmp.put_u8(self.chancount);
25327        __tmp.put_u8(self.rssi);
25328        if matches!(version, MavlinkVersion::V2) {
25329            let len = __tmp.len();
25330            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25331        } else {
25332            __tmp.len()
25333        }
25334    }
25335}
25336#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
25337#[doc = ""]
25338#[doc = "ID: 70"]
25339#[derive(Debug, Clone, PartialEq)]
25340#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25342#[cfg_attr(feature = "ts", derive(TS))]
25343#[cfg_attr(feature = "ts", ts(export))]
25344pub struct RC_CHANNELS_OVERRIDE_DATA {
25345    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25346    pub chan1_raw: u16,
25347    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25348    pub chan2_raw: u16,
25349    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25350    pub chan3_raw: u16,
25351    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25352    pub chan4_raw: u16,
25353    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25354    pub chan5_raw: u16,
25355    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25356    pub chan6_raw: u16,
25357    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25358    pub chan7_raw: u16,
25359    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25360    pub chan8_raw: u16,
25361    #[doc = "System ID"]
25362    pub target_system: u8,
25363    #[doc = "Component ID"]
25364    pub target_component: u8,
25365    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25366    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25367    pub chan9_raw: u16,
25368    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25369    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25370    pub chan10_raw: u16,
25371    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25372    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25373    pub chan11_raw: u16,
25374    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25375    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25376    pub chan12_raw: u16,
25377    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25378    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25379    pub chan13_raw: u16,
25380    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25381    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25382    pub chan14_raw: u16,
25383    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25384    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25385    pub chan15_raw: u16,
25386    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25387    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25388    pub chan16_raw: u16,
25389    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25390    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25391    pub chan17_raw: u16,
25392    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25393    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25394    pub chan18_raw: u16,
25395}
25396impl RC_CHANNELS_OVERRIDE_DATA {
25397    pub const ENCODED_LEN: usize = 38usize;
25398    pub const DEFAULT: Self = Self {
25399        chan1_raw: 0_u16,
25400        chan2_raw: 0_u16,
25401        chan3_raw: 0_u16,
25402        chan4_raw: 0_u16,
25403        chan5_raw: 0_u16,
25404        chan6_raw: 0_u16,
25405        chan7_raw: 0_u16,
25406        chan8_raw: 0_u16,
25407        target_system: 0_u8,
25408        target_component: 0_u8,
25409        chan9_raw: 0_u16,
25410        chan10_raw: 0_u16,
25411        chan11_raw: 0_u16,
25412        chan12_raw: 0_u16,
25413        chan13_raw: 0_u16,
25414        chan14_raw: 0_u16,
25415        chan15_raw: 0_u16,
25416        chan16_raw: 0_u16,
25417        chan17_raw: 0_u16,
25418        chan18_raw: 0_u16,
25419    };
25420    #[cfg(feature = "arbitrary")]
25421    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25422        use arbitrary::{Arbitrary, Unstructured};
25423        let mut buf = [0u8; 1024];
25424        rng.fill_bytes(&mut buf);
25425        let mut unstructured = Unstructured::new(&buf);
25426        Self::arbitrary(&mut unstructured).unwrap_or_default()
25427    }
25428}
25429impl Default for RC_CHANNELS_OVERRIDE_DATA {
25430    fn default() -> Self {
25431        Self::DEFAULT.clone()
25432    }
25433}
25434impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
25435    type Message = MavMessage;
25436    const ID: u32 = 70u32;
25437    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
25438    const EXTRA_CRC: u8 = 124u8;
25439    const ENCODED_LEN: usize = 38usize;
25440    fn deser(
25441        _version: MavlinkVersion,
25442        __input: &[u8],
25443    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25444        let avail_len = __input.len();
25445        let mut payload_buf = [0; Self::ENCODED_LEN];
25446        let mut buf = if avail_len < Self::ENCODED_LEN {
25447            payload_buf[0..avail_len].copy_from_slice(__input);
25448            Bytes::new(&payload_buf)
25449        } else {
25450            Bytes::new(__input)
25451        };
25452        let mut __struct = Self::default();
25453        __struct.chan1_raw = buf.get_u16_le();
25454        __struct.chan2_raw = buf.get_u16_le();
25455        __struct.chan3_raw = buf.get_u16_le();
25456        __struct.chan4_raw = buf.get_u16_le();
25457        __struct.chan5_raw = buf.get_u16_le();
25458        __struct.chan6_raw = buf.get_u16_le();
25459        __struct.chan7_raw = buf.get_u16_le();
25460        __struct.chan8_raw = buf.get_u16_le();
25461        __struct.target_system = buf.get_u8();
25462        __struct.target_component = buf.get_u8();
25463        __struct.chan9_raw = buf.get_u16_le();
25464        __struct.chan10_raw = buf.get_u16_le();
25465        __struct.chan11_raw = buf.get_u16_le();
25466        __struct.chan12_raw = buf.get_u16_le();
25467        __struct.chan13_raw = buf.get_u16_le();
25468        __struct.chan14_raw = buf.get_u16_le();
25469        __struct.chan15_raw = buf.get_u16_le();
25470        __struct.chan16_raw = buf.get_u16_le();
25471        __struct.chan17_raw = buf.get_u16_le();
25472        __struct.chan18_raw = buf.get_u16_le();
25473        Ok(__struct)
25474    }
25475    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25476        let mut __tmp = BytesMut::new(bytes);
25477        #[allow(clippy::absurd_extreme_comparisons)]
25478        #[allow(unused_comparisons)]
25479        if __tmp.remaining() < Self::ENCODED_LEN {
25480            panic!(
25481                "buffer is too small (need {} bytes, but got {})",
25482                Self::ENCODED_LEN,
25483                __tmp.remaining(),
25484            )
25485        }
25486        __tmp.put_u16_le(self.chan1_raw);
25487        __tmp.put_u16_le(self.chan2_raw);
25488        __tmp.put_u16_le(self.chan3_raw);
25489        __tmp.put_u16_le(self.chan4_raw);
25490        __tmp.put_u16_le(self.chan5_raw);
25491        __tmp.put_u16_le(self.chan6_raw);
25492        __tmp.put_u16_le(self.chan7_raw);
25493        __tmp.put_u16_le(self.chan8_raw);
25494        __tmp.put_u8(self.target_system);
25495        __tmp.put_u8(self.target_component);
25496        if matches!(version, MavlinkVersion::V2) {
25497            __tmp.put_u16_le(self.chan9_raw);
25498            __tmp.put_u16_le(self.chan10_raw);
25499            __tmp.put_u16_le(self.chan11_raw);
25500            __tmp.put_u16_le(self.chan12_raw);
25501            __tmp.put_u16_le(self.chan13_raw);
25502            __tmp.put_u16_le(self.chan14_raw);
25503            __tmp.put_u16_le(self.chan15_raw);
25504            __tmp.put_u16_le(self.chan16_raw);
25505            __tmp.put_u16_le(self.chan17_raw);
25506            __tmp.put_u16_le(self.chan18_raw);
25507            let len = __tmp.len();
25508            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25509        } else {
25510            __tmp.len()
25511        }
25512    }
25513}
25514#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25515#[doc = ""]
25516#[doc = "ID: 35"]
25517#[derive(Debug, Clone, PartialEq)]
25518#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25519#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25520#[cfg_attr(feature = "ts", derive(TS))]
25521#[cfg_attr(feature = "ts", ts(export))]
25522pub struct RC_CHANNELS_RAW_DATA {
25523    #[doc = "Timestamp (time since system boot)."]
25524    pub time_boot_ms: u32,
25525    #[doc = "RC channel 1 value."]
25526    pub chan1_raw: u16,
25527    #[doc = "RC channel 2 value."]
25528    pub chan2_raw: u16,
25529    #[doc = "RC channel 3 value."]
25530    pub chan3_raw: u16,
25531    #[doc = "RC channel 4 value."]
25532    pub chan4_raw: u16,
25533    #[doc = "RC channel 5 value."]
25534    pub chan5_raw: u16,
25535    #[doc = "RC channel 6 value."]
25536    pub chan6_raw: u16,
25537    #[doc = "RC channel 7 value."]
25538    pub chan7_raw: u16,
25539    #[doc = "RC channel 8 value."]
25540    pub chan8_raw: u16,
25541    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25542    pub port: u8,
25543    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25544    pub rssi: u8,
25545}
25546impl RC_CHANNELS_RAW_DATA {
25547    pub const ENCODED_LEN: usize = 22usize;
25548    pub const DEFAULT: Self = Self {
25549        time_boot_ms: 0_u32,
25550        chan1_raw: 0_u16,
25551        chan2_raw: 0_u16,
25552        chan3_raw: 0_u16,
25553        chan4_raw: 0_u16,
25554        chan5_raw: 0_u16,
25555        chan6_raw: 0_u16,
25556        chan7_raw: 0_u16,
25557        chan8_raw: 0_u16,
25558        port: 0_u8,
25559        rssi: 0_u8,
25560    };
25561    #[cfg(feature = "arbitrary")]
25562    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25563        use arbitrary::{Arbitrary, Unstructured};
25564        let mut buf = [0u8; 1024];
25565        rng.fill_bytes(&mut buf);
25566        let mut unstructured = Unstructured::new(&buf);
25567        Self::arbitrary(&mut unstructured).unwrap_or_default()
25568    }
25569}
25570impl Default for RC_CHANNELS_RAW_DATA {
25571    fn default() -> Self {
25572        Self::DEFAULT.clone()
25573    }
25574}
25575impl MessageData for RC_CHANNELS_RAW_DATA {
25576    type Message = MavMessage;
25577    const ID: u32 = 35u32;
25578    const NAME: &'static str = "RC_CHANNELS_RAW";
25579    const EXTRA_CRC: u8 = 244u8;
25580    const ENCODED_LEN: usize = 22usize;
25581    fn deser(
25582        _version: MavlinkVersion,
25583        __input: &[u8],
25584    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25585        let avail_len = __input.len();
25586        let mut payload_buf = [0; Self::ENCODED_LEN];
25587        let mut buf = if avail_len < Self::ENCODED_LEN {
25588            payload_buf[0..avail_len].copy_from_slice(__input);
25589            Bytes::new(&payload_buf)
25590        } else {
25591            Bytes::new(__input)
25592        };
25593        let mut __struct = Self::default();
25594        __struct.time_boot_ms = buf.get_u32_le();
25595        __struct.chan1_raw = buf.get_u16_le();
25596        __struct.chan2_raw = buf.get_u16_le();
25597        __struct.chan3_raw = buf.get_u16_le();
25598        __struct.chan4_raw = buf.get_u16_le();
25599        __struct.chan5_raw = buf.get_u16_le();
25600        __struct.chan6_raw = buf.get_u16_le();
25601        __struct.chan7_raw = buf.get_u16_le();
25602        __struct.chan8_raw = buf.get_u16_le();
25603        __struct.port = buf.get_u8();
25604        __struct.rssi = buf.get_u8();
25605        Ok(__struct)
25606    }
25607    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25608        let mut __tmp = BytesMut::new(bytes);
25609        #[allow(clippy::absurd_extreme_comparisons)]
25610        #[allow(unused_comparisons)]
25611        if __tmp.remaining() < Self::ENCODED_LEN {
25612            panic!(
25613                "buffer is too small (need {} bytes, but got {})",
25614                Self::ENCODED_LEN,
25615                __tmp.remaining(),
25616            )
25617        }
25618        __tmp.put_u32_le(self.time_boot_ms);
25619        __tmp.put_u16_le(self.chan1_raw);
25620        __tmp.put_u16_le(self.chan2_raw);
25621        __tmp.put_u16_le(self.chan3_raw);
25622        __tmp.put_u16_le(self.chan4_raw);
25623        __tmp.put_u16_le(self.chan5_raw);
25624        __tmp.put_u16_le(self.chan6_raw);
25625        __tmp.put_u16_le(self.chan7_raw);
25626        __tmp.put_u16_le(self.chan8_raw);
25627        __tmp.put_u8(self.port);
25628        __tmp.put_u8(self.rssi);
25629        if matches!(version, MavlinkVersion::V2) {
25630            let len = __tmp.len();
25631            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25632        } else {
25633            __tmp.len()
25634        }
25635    }
25636}
25637#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
25638#[doc = ""]
25639#[doc = "ID: 34"]
25640#[derive(Debug, Clone, PartialEq)]
25641#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25642#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25643#[cfg_attr(feature = "ts", derive(TS))]
25644#[cfg_attr(feature = "ts", ts(export))]
25645pub struct RC_CHANNELS_SCALED_DATA {
25646    #[doc = "Timestamp (time since system boot)."]
25647    pub time_boot_ms: u32,
25648    #[doc = "RC channel 1 value scaled."]
25649    pub chan1_scaled: i16,
25650    #[doc = "RC channel 2 value scaled."]
25651    pub chan2_scaled: i16,
25652    #[doc = "RC channel 3 value scaled."]
25653    pub chan3_scaled: i16,
25654    #[doc = "RC channel 4 value scaled."]
25655    pub chan4_scaled: i16,
25656    #[doc = "RC channel 5 value scaled."]
25657    pub chan5_scaled: i16,
25658    #[doc = "RC channel 6 value scaled."]
25659    pub chan6_scaled: i16,
25660    #[doc = "RC channel 7 value scaled."]
25661    pub chan7_scaled: i16,
25662    #[doc = "RC channel 8 value scaled."]
25663    pub chan8_scaled: i16,
25664    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25665    pub port: u8,
25666    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25667    pub rssi: u8,
25668}
25669impl RC_CHANNELS_SCALED_DATA {
25670    pub const ENCODED_LEN: usize = 22usize;
25671    pub const DEFAULT: Self = Self {
25672        time_boot_ms: 0_u32,
25673        chan1_scaled: 0_i16,
25674        chan2_scaled: 0_i16,
25675        chan3_scaled: 0_i16,
25676        chan4_scaled: 0_i16,
25677        chan5_scaled: 0_i16,
25678        chan6_scaled: 0_i16,
25679        chan7_scaled: 0_i16,
25680        chan8_scaled: 0_i16,
25681        port: 0_u8,
25682        rssi: 0_u8,
25683    };
25684    #[cfg(feature = "arbitrary")]
25685    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25686        use arbitrary::{Arbitrary, Unstructured};
25687        let mut buf = [0u8; 1024];
25688        rng.fill_bytes(&mut buf);
25689        let mut unstructured = Unstructured::new(&buf);
25690        Self::arbitrary(&mut unstructured).unwrap_or_default()
25691    }
25692}
25693impl Default for RC_CHANNELS_SCALED_DATA {
25694    fn default() -> Self {
25695        Self::DEFAULT.clone()
25696    }
25697}
25698impl MessageData for RC_CHANNELS_SCALED_DATA {
25699    type Message = MavMessage;
25700    const ID: u32 = 34u32;
25701    const NAME: &'static str = "RC_CHANNELS_SCALED";
25702    const EXTRA_CRC: u8 = 237u8;
25703    const ENCODED_LEN: usize = 22usize;
25704    fn deser(
25705        _version: MavlinkVersion,
25706        __input: &[u8],
25707    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25708        let avail_len = __input.len();
25709        let mut payload_buf = [0; Self::ENCODED_LEN];
25710        let mut buf = if avail_len < Self::ENCODED_LEN {
25711            payload_buf[0..avail_len].copy_from_slice(__input);
25712            Bytes::new(&payload_buf)
25713        } else {
25714            Bytes::new(__input)
25715        };
25716        let mut __struct = Self::default();
25717        __struct.time_boot_ms = buf.get_u32_le();
25718        __struct.chan1_scaled = buf.get_i16_le();
25719        __struct.chan2_scaled = buf.get_i16_le();
25720        __struct.chan3_scaled = buf.get_i16_le();
25721        __struct.chan4_scaled = buf.get_i16_le();
25722        __struct.chan5_scaled = buf.get_i16_le();
25723        __struct.chan6_scaled = buf.get_i16_le();
25724        __struct.chan7_scaled = buf.get_i16_le();
25725        __struct.chan8_scaled = buf.get_i16_le();
25726        __struct.port = buf.get_u8();
25727        __struct.rssi = buf.get_u8();
25728        Ok(__struct)
25729    }
25730    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25731        let mut __tmp = BytesMut::new(bytes);
25732        #[allow(clippy::absurd_extreme_comparisons)]
25733        #[allow(unused_comparisons)]
25734        if __tmp.remaining() < Self::ENCODED_LEN {
25735            panic!(
25736                "buffer is too small (need {} bytes, but got {})",
25737                Self::ENCODED_LEN,
25738                __tmp.remaining(),
25739            )
25740        }
25741        __tmp.put_u32_le(self.time_boot_ms);
25742        __tmp.put_i16_le(self.chan1_scaled);
25743        __tmp.put_i16_le(self.chan2_scaled);
25744        __tmp.put_i16_le(self.chan3_scaled);
25745        __tmp.put_i16_le(self.chan4_scaled);
25746        __tmp.put_i16_le(self.chan5_scaled);
25747        __tmp.put_i16_le(self.chan6_scaled);
25748        __tmp.put_i16_le(self.chan7_scaled);
25749        __tmp.put_i16_le(self.chan8_scaled);
25750        __tmp.put_u8(self.port);
25751        __tmp.put_u8(self.rssi);
25752        if matches!(version, MavlinkVersion::V2) {
25753            let len = __tmp.len();
25754            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25755        } else {
25756            __tmp.len()
25757        }
25758    }
25759}
25760#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
25761#[doc = "Request a data stream."]
25762#[doc = ""]
25763#[doc = "ID: 66"]
25764#[derive(Debug, Clone, PartialEq)]
25765#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25766#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25767#[cfg_attr(feature = "ts", derive(TS))]
25768#[cfg_attr(feature = "ts", ts(export))]
25769pub struct REQUEST_DATA_STREAM_DATA {
25770    #[doc = "The requested message rate"]
25771    pub req_message_rate: u16,
25772    #[doc = "The target requested to send the message stream."]
25773    pub target_system: u8,
25774    #[doc = "The target requested to send the message stream."]
25775    pub target_component: u8,
25776    #[doc = "The ID of the requested data stream"]
25777    pub req_stream_id: u8,
25778    #[doc = "1 to start sending, 0 to stop sending."]
25779    pub start_stop: u8,
25780}
25781impl REQUEST_DATA_STREAM_DATA {
25782    pub const ENCODED_LEN: usize = 6usize;
25783    pub const DEFAULT: Self = Self {
25784        req_message_rate: 0_u16,
25785        target_system: 0_u8,
25786        target_component: 0_u8,
25787        req_stream_id: 0_u8,
25788        start_stop: 0_u8,
25789    };
25790    #[cfg(feature = "arbitrary")]
25791    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25792        use arbitrary::{Arbitrary, Unstructured};
25793        let mut buf = [0u8; 1024];
25794        rng.fill_bytes(&mut buf);
25795        let mut unstructured = Unstructured::new(&buf);
25796        Self::arbitrary(&mut unstructured).unwrap_or_default()
25797    }
25798}
25799impl Default for REQUEST_DATA_STREAM_DATA {
25800    fn default() -> Self {
25801        Self::DEFAULT.clone()
25802    }
25803}
25804impl MessageData for REQUEST_DATA_STREAM_DATA {
25805    type Message = MavMessage;
25806    const ID: u32 = 66u32;
25807    const NAME: &'static str = "REQUEST_DATA_STREAM";
25808    const EXTRA_CRC: u8 = 148u8;
25809    const ENCODED_LEN: usize = 6usize;
25810    fn deser(
25811        _version: MavlinkVersion,
25812        __input: &[u8],
25813    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25814        let avail_len = __input.len();
25815        let mut payload_buf = [0; Self::ENCODED_LEN];
25816        let mut buf = if avail_len < Self::ENCODED_LEN {
25817            payload_buf[0..avail_len].copy_from_slice(__input);
25818            Bytes::new(&payload_buf)
25819        } else {
25820            Bytes::new(__input)
25821        };
25822        let mut __struct = Self::default();
25823        __struct.req_message_rate = buf.get_u16_le();
25824        __struct.target_system = buf.get_u8();
25825        __struct.target_component = buf.get_u8();
25826        __struct.req_stream_id = buf.get_u8();
25827        __struct.start_stop = buf.get_u8();
25828        Ok(__struct)
25829    }
25830    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25831        let mut __tmp = BytesMut::new(bytes);
25832        #[allow(clippy::absurd_extreme_comparisons)]
25833        #[allow(unused_comparisons)]
25834        if __tmp.remaining() < Self::ENCODED_LEN {
25835            panic!(
25836                "buffer is too small (need {} bytes, but got {})",
25837                Self::ENCODED_LEN,
25838                __tmp.remaining(),
25839            )
25840        }
25841        __tmp.put_u16_le(self.req_message_rate);
25842        __tmp.put_u8(self.target_system);
25843        __tmp.put_u8(self.target_component);
25844        __tmp.put_u8(self.req_stream_id);
25845        __tmp.put_u8(self.start_stop);
25846        if matches!(version, MavlinkVersion::V2) {
25847            let len = __tmp.len();
25848            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25849        } else {
25850            __tmp.len()
25851        }
25852    }
25853}
25854#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
25855#[doc = ""]
25856#[doc = "ID: 412"]
25857#[derive(Debug, Clone, PartialEq)]
25858#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25859#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25860#[cfg_attr(feature = "ts", derive(TS))]
25861#[cfg_attr(feature = "ts", ts(export))]
25862pub struct REQUEST_EVENT_DATA {
25863    #[doc = "First sequence number of the requested event."]
25864    pub first_sequence: u16,
25865    #[doc = "Last sequence number of the requested event."]
25866    pub last_sequence: u16,
25867    #[doc = "System ID"]
25868    pub target_system: u8,
25869    #[doc = "Component ID"]
25870    pub target_component: u8,
25871}
25872impl REQUEST_EVENT_DATA {
25873    pub const ENCODED_LEN: usize = 6usize;
25874    pub const DEFAULT: Self = Self {
25875        first_sequence: 0_u16,
25876        last_sequence: 0_u16,
25877        target_system: 0_u8,
25878        target_component: 0_u8,
25879    };
25880    #[cfg(feature = "arbitrary")]
25881    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25882        use arbitrary::{Arbitrary, Unstructured};
25883        let mut buf = [0u8; 1024];
25884        rng.fill_bytes(&mut buf);
25885        let mut unstructured = Unstructured::new(&buf);
25886        Self::arbitrary(&mut unstructured).unwrap_or_default()
25887    }
25888}
25889impl Default for REQUEST_EVENT_DATA {
25890    fn default() -> Self {
25891        Self::DEFAULT.clone()
25892    }
25893}
25894impl MessageData for REQUEST_EVENT_DATA {
25895    type Message = MavMessage;
25896    const ID: u32 = 412u32;
25897    const NAME: &'static str = "REQUEST_EVENT";
25898    const EXTRA_CRC: u8 = 33u8;
25899    const ENCODED_LEN: usize = 6usize;
25900    fn deser(
25901        _version: MavlinkVersion,
25902        __input: &[u8],
25903    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25904        let avail_len = __input.len();
25905        let mut payload_buf = [0; Self::ENCODED_LEN];
25906        let mut buf = if avail_len < Self::ENCODED_LEN {
25907            payload_buf[0..avail_len].copy_from_slice(__input);
25908            Bytes::new(&payload_buf)
25909        } else {
25910            Bytes::new(__input)
25911        };
25912        let mut __struct = Self::default();
25913        __struct.first_sequence = buf.get_u16_le();
25914        __struct.last_sequence = buf.get_u16_le();
25915        __struct.target_system = buf.get_u8();
25916        __struct.target_component = buf.get_u8();
25917        Ok(__struct)
25918    }
25919    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25920        let mut __tmp = BytesMut::new(bytes);
25921        #[allow(clippy::absurd_extreme_comparisons)]
25922        #[allow(unused_comparisons)]
25923        if __tmp.remaining() < Self::ENCODED_LEN {
25924            panic!(
25925                "buffer is too small (need {} bytes, but got {})",
25926                Self::ENCODED_LEN,
25927                __tmp.remaining(),
25928            )
25929        }
25930        __tmp.put_u16_le(self.first_sequence);
25931        __tmp.put_u16_le(self.last_sequence);
25932        __tmp.put_u8(self.target_system);
25933        __tmp.put_u8(self.target_component);
25934        if matches!(version, MavlinkVersion::V2) {
25935            let len = __tmp.len();
25936            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25937        } else {
25938            __tmp.len()
25939        }
25940    }
25941}
25942#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
25943#[doc = ""]
25944#[doc = "ID: 142"]
25945#[derive(Debug, Clone, PartialEq)]
25946#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25947#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25948#[cfg_attr(feature = "ts", derive(TS))]
25949#[cfg_attr(feature = "ts", ts(export))]
25950pub struct RESOURCE_REQUEST_DATA {
25951    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
25952    pub request_id: u8,
25953    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
25954    pub uri_type: u8,
25955    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
25956    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25957    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25958    pub uri: [u8; 120],
25959    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
25960    pub transfer_type: u8,
25961    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
25962    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25963    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25964    pub storage: [u8; 120],
25965}
25966impl RESOURCE_REQUEST_DATA {
25967    pub const ENCODED_LEN: usize = 243usize;
25968    pub const DEFAULT: Self = Self {
25969        request_id: 0_u8,
25970        uri_type: 0_u8,
25971        uri: [0_u8; 120usize],
25972        transfer_type: 0_u8,
25973        storage: [0_u8; 120usize],
25974    };
25975    #[cfg(feature = "arbitrary")]
25976    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25977        use arbitrary::{Arbitrary, Unstructured};
25978        let mut buf = [0u8; 1024];
25979        rng.fill_bytes(&mut buf);
25980        let mut unstructured = Unstructured::new(&buf);
25981        Self::arbitrary(&mut unstructured).unwrap_or_default()
25982    }
25983}
25984impl Default for RESOURCE_REQUEST_DATA {
25985    fn default() -> Self {
25986        Self::DEFAULT.clone()
25987    }
25988}
25989impl MessageData for RESOURCE_REQUEST_DATA {
25990    type Message = MavMessage;
25991    const ID: u32 = 142u32;
25992    const NAME: &'static str = "RESOURCE_REQUEST";
25993    const EXTRA_CRC: u8 = 72u8;
25994    const ENCODED_LEN: usize = 243usize;
25995    fn deser(
25996        _version: MavlinkVersion,
25997        __input: &[u8],
25998    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25999        let avail_len = __input.len();
26000        let mut payload_buf = [0; Self::ENCODED_LEN];
26001        let mut buf = if avail_len < Self::ENCODED_LEN {
26002            payload_buf[0..avail_len].copy_from_slice(__input);
26003            Bytes::new(&payload_buf)
26004        } else {
26005            Bytes::new(__input)
26006        };
26007        let mut __struct = Self::default();
26008        __struct.request_id = buf.get_u8();
26009        __struct.uri_type = buf.get_u8();
26010        for v in &mut __struct.uri {
26011            let val = buf.get_u8();
26012            *v = val;
26013        }
26014        __struct.transfer_type = buf.get_u8();
26015        for v in &mut __struct.storage {
26016            let val = buf.get_u8();
26017            *v = val;
26018        }
26019        Ok(__struct)
26020    }
26021    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26022        let mut __tmp = BytesMut::new(bytes);
26023        #[allow(clippy::absurd_extreme_comparisons)]
26024        #[allow(unused_comparisons)]
26025        if __tmp.remaining() < Self::ENCODED_LEN {
26026            panic!(
26027                "buffer is too small (need {} bytes, but got {})",
26028                Self::ENCODED_LEN,
26029                __tmp.remaining(),
26030            )
26031        }
26032        __tmp.put_u8(self.request_id);
26033        __tmp.put_u8(self.uri_type);
26034        for val in &self.uri {
26035            __tmp.put_u8(*val);
26036        }
26037        __tmp.put_u8(self.transfer_type);
26038        for val in &self.storage {
26039            __tmp.put_u8(*val);
26040        }
26041        if matches!(version, MavlinkVersion::V2) {
26042            let len = __tmp.len();
26043            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26044        } else {
26045            __tmp.len()
26046        }
26047    }
26048}
26049#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
26050#[doc = ""]
26051#[doc = "ID: 413"]
26052#[derive(Debug, Clone, PartialEq)]
26053#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26054#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26055#[cfg_attr(feature = "ts", derive(TS))]
26056#[cfg_attr(feature = "ts", ts(export))]
26057pub struct RESPONSE_EVENT_ERROR_DATA {
26058    #[doc = "Sequence number."]
26059    pub sequence: u16,
26060    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
26061    pub sequence_oldest_available: u16,
26062    #[doc = "System ID"]
26063    pub target_system: u8,
26064    #[doc = "Component ID"]
26065    pub target_component: u8,
26066    #[doc = "Error reason."]
26067    pub reason: MavEventErrorReason,
26068}
26069impl RESPONSE_EVENT_ERROR_DATA {
26070    pub const ENCODED_LEN: usize = 7usize;
26071    pub const DEFAULT: Self = Self {
26072        sequence: 0_u16,
26073        sequence_oldest_available: 0_u16,
26074        target_system: 0_u8,
26075        target_component: 0_u8,
26076        reason: MavEventErrorReason::DEFAULT,
26077    };
26078    #[cfg(feature = "arbitrary")]
26079    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26080        use arbitrary::{Arbitrary, Unstructured};
26081        let mut buf = [0u8; 1024];
26082        rng.fill_bytes(&mut buf);
26083        let mut unstructured = Unstructured::new(&buf);
26084        Self::arbitrary(&mut unstructured).unwrap_or_default()
26085    }
26086}
26087impl Default for RESPONSE_EVENT_ERROR_DATA {
26088    fn default() -> Self {
26089        Self::DEFAULT.clone()
26090    }
26091}
26092impl MessageData for RESPONSE_EVENT_ERROR_DATA {
26093    type Message = MavMessage;
26094    const ID: u32 = 413u32;
26095    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
26096    const EXTRA_CRC: u8 = 77u8;
26097    const ENCODED_LEN: usize = 7usize;
26098    fn deser(
26099        _version: MavlinkVersion,
26100        __input: &[u8],
26101    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26102        let avail_len = __input.len();
26103        let mut payload_buf = [0; Self::ENCODED_LEN];
26104        let mut buf = if avail_len < Self::ENCODED_LEN {
26105            payload_buf[0..avail_len].copy_from_slice(__input);
26106            Bytes::new(&payload_buf)
26107        } else {
26108            Bytes::new(__input)
26109        };
26110        let mut __struct = Self::default();
26111        __struct.sequence = buf.get_u16_le();
26112        __struct.sequence_oldest_available = buf.get_u16_le();
26113        __struct.target_system = buf.get_u8();
26114        __struct.target_component = buf.get_u8();
26115        let tmp = buf.get_u8();
26116        __struct.reason =
26117            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26118                enum_type: "MavEventErrorReason",
26119                value: tmp as u32,
26120            })?;
26121        Ok(__struct)
26122    }
26123    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26124        let mut __tmp = BytesMut::new(bytes);
26125        #[allow(clippy::absurd_extreme_comparisons)]
26126        #[allow(unused_comparisons)]
26127        if __tmp.remaining() < Self::ENCODED_LEN {
26128            panic!(
26129                "buffer is too small (need {} bytes, but got {})",
26130                Self::ENCODED_LEN,
26131                __tmp.remaining(),
26132            )
26133        }
26134        __tmp.put_u16_le(self.sequence);
26135        __tmp.put_u16_le(self.sequence_oldest_available);
26136        __tmp.put_u8(self.target_system);
26137        __tmp.put_u8(self.target_component);
26138        __tmp.put_u8(self.reason as u8);
26139        if matches!(version, MavlinkVersion::V2) {
26140            let len = __tmp.len();
26141            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26142        } else {
26143            __tmp.len()
26144        }
26145    }
26146}
26147#[doc = "Read out the safety zone the MAV currently assumes."]
26148#[doc = ""]
26149#[doc = "ID: 55"]
26150#[derive(Debug, Clone, PartialEq)]
26151#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26152#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26153#[cfg_attr(feature = "ts", derive(TS))]
26154#[cfg_attr(feature = "ts", ts(export))]
26155pub struct SAFETY_ALLOWED_AREA_DATA {
26156    #[doc = "x position 1 / Latitude 1"]
26157    pub p1x: f32,
26158    #[doc = "y position 1 / Longitude 1"]
26159    pub p1y: f32,
26160    #[doc = "z position 1 / Altitude 1"]
26161    pub p1z: f32,
26162    #[doc = "x position 2 / Latitude 2"]
26163    pub p2x: f32,
26164    #[doc = "y position 2 / Longitude 2"]
26165    pub p2y: f32,
26166    #[doc = "z position 2 / Altitude 2"]
26167    pub p2z: f32,
26168    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26169    pub frame: MavFrame,
26170}
26171impl SAFETY_ALLOWED_AREA_DATA {
26172    pub const ENCODED_LEN: usize = 25usize;
26173    pub const DEFAULT: Self = Self {
26174        p1x: 0.0_f32,
26175        p1y: 0.0_f32,
26176        p1z: 0.0_f32,
26177        p2x: 0.0_f32,
26178        p2y: 0.0_f32,
26179        p2z: 0.0_f32,
26180        frame: MavFrame::DEFAULT,
26181    };
26182    #[cfg(feature = "arbitrary")]
26183    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26184        use arbitrary::{Arbitrary, Unstructured};
26185        let mut buf = [0u8; 1024];
26186        rng.fill_bytes(&mut buf);
26187        let mut unstructured = Unstructured::new(&buf);
26188        Self::arbitrary(&mut unstructured).unwrap_or_default()
26189    }
26190}
26191impl Default for SAFETY_ALLOWED_AREA_DATA {
26192    fn default() -> Self {
26193        Self::DEFAULT.clone()
26194    }
26195}
26196impl MessageData for SAFETY_ALLOWED_AREA_DATA {
26197    type Message = MavMessage;
26198    const ID: u32 = 55u32;
26199    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
26200    const EXTRA_CRC: u8 = 3u8;
26201    const ENCODED_LEN: usize = 25usize;
26202    fn deser(
26203        _version: MavlinkVersion,
26204        __input: &[u8],
26205    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26206        let avail_len = __input.len();
26207        let mut payload_buf = [0; Self::ENCODED_LEN];
26208        let mut buf = if avail_len < Self::ENCODED_LEN {
26209            payload_buf[0..avail_len].copy_from_slice(__input);
26210            Bytes::new(&payload_buf)
26211        } else {
26212            Bytes::new(__input)
26213        };
26214        let mut __struct = Self::default();
26215        __struct.p1x = buf.get_f32_le();
26216        __struct.p1y = buf.get_f32_le();
26217        __struct.p1z = buf.get_f32_le();
26218        __struct.p2x = buf.get_f32_le();
26219        __struct.p2y = buf.get_f32_le();
26220        __struct.p2z = buf.get_f32_le();
26221        let tmp = buf.get_u8();
26222        __struct.frame =
26223            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26224                enum_type: "MavFrame",
26225                value: tmp as u32,
26226            })?;
26227        Ok(__struct)
26228    }
26229    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26230        let mut __tmp = BytesMut::new(bytes);
26231        #[allow(clippy::absurd_extreme_comparisons)]
26232        #[allow(unused_comparisons)]
26233        if __tmp.remaining() < Self::ENCODED_LEN {
26234            panic!(
26235                "buffer is too small (need {} bytes, but got {})",
26236                Self::ENCODED_LEN,
26237                __tmp.remaining(),
26238            )
26239        }
26240        __tmp.put_f32_le(self.p1x);
26241        __tmp.put_f32_le(self.p1y);
26242        __tmp.put_f32_le(self.p1z);
26243        __tmp.put_f32_le(self.p2x);
26244        __tmp.put_f32_le(self.p2y);
26245        __tmp.put_f32_le(self.p2z);
26246        __tmp.put_u8(self.frame as u8);
26247        if matches!(version, MavlinkVersion::V2) {
26248            let len = __tmp.len();
26249            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26250        } else {
26251            __tmp.len()
26252        }
26253    }
26254}
26255#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
26256#[doc = ""]
26257#[doc = "ID: 54"]
26258#[derive(Debug, Clone, PartialEq)]
26259#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26260#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26261#[cfg_attr(feature = "ts", derive(TS))]
26262#[cfg_attr(feature = "ts", ts(export))]
26263pub struct SAFETY_SET_ALLOWED_AREA_DATA {
26264    #[doc = "x position 1 / Latitude 1"]
26265    pub p1x: f32,
26266    #[doc = "y position 1 / Longitude 1"]
26267    pub p1y: f32,
26268    #[doc = "z position 1 / Altitude 1"]
26269    pub p1z: f32,
26270    #[doc = "x position 2 / Latitude 2"]
26271    pub p2x: f32,
26272    #[doc = "y position 2 / Longitude 2"]
26273    pub p2y: f32,
26274    #[doc = "z position 2 / Altitude 2"]
26275    pub p2z: f32,
26276    #[doc = "System ID"]
26277    pub target_system: u8,
26278    #[doc = "Component ID"]
26279    pub target_component: u8,
26280    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26281    pub frame: MavFrame,
26282}
26283impl SAFETY_SET_ALLOWED_AREA_DATA {
26284    pub const ENCODED_LEN: usize = 27usize;
26285    pub const DEFAULT: Self = Self {
26286        p1x: 0.0_f32,
26287        p1y: 0.0_f32,
26288        p1z: 0.0_f32,
26289        p2x: 0.0_f32,
26290        p2y: 0.0_f32,
26291        p2z: 0.0_f32,
26292        target_system: 0_u8,
26293        target_component: 0_u8,
26294        frame: MavFrame::DEFAULT,
26295    };
26296    #[cfg(feature = "arbitrary")]
26297    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26298        use arbitrary::{Arbitrary, Unstructured};
26299        let mut buf = [0u8; 1024];
26300        rng.fill_bytes(&mut buf);
26301        let mut unstructured = Unstructured::new(&buf);
26302        Self::arbitrary(&mut unstructured).unwrap_or_default()
26303    }
26304}
26305impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
26306    fn default() -> Self {
26307        Self::DEFAULT.clone()
26308    }
26309}
26310impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
26311    type Message = MavMessage;
26312    const ID: u32 = 54u32;
26313    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
26314    const EXTRA_CRC: u8 = 15u8;
26315    const ENCODED_LEN: usize = 27usize;
26316    fn deser(
26317        _version: MavlinkVersion,
26318        __input: &[u8],
26319    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26320        let avail_len = __input.len();
26321        let mut payload_buf = [0; Self::ENCODED_LEN];
26322        let mut buf = if avail_len < Self::ENCODED_LEN {
26323            payload_buf[0..avail_len].copy_from_slice(__input);
26324            Bytes::new(&payload_buf)
26325        } else {
26326            Bytes::new(__input)
26327        };
26328        let mut __struct = Self::default();
26329        __struct.p1x = buf.get_f32_le();
26330        __struct.p1y = buf.get_f32_le();
26331        __struct.p1z = buf.get_f32_le();
26332        __struct.p2x = buf.get_f32_le();
26333        __struct.p2y = buf.get_f32_le();
26334        __struct.p2z = buf.get_f32_le();
26335        __struct.target_system = buf.get_u8();
26336        __struct.target_component = buf.get_u8();
26337        let tmp = buf.get_u8();
26338        __struct.frame =
26339            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26340                enum_type: "MavFrame",
26341                value: tmp as u32,
26342            })?;
26343        Ok(__struct)
26344    }
26345    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26346        let mut __tmp = BytesMut::new(bytes);
26347        #[allow(clippy::absurd_extreme_comparisons)]
26348        #[allow(unused_comparisons)]
26349        if __tmp.remaining() < Self::ENCODED_LEN {
26350            panic!(
26351                "buffer is too small (need {} bytes, but got {})",
26352                Self::ENCODED_LEN,
26353                __tmp.remaining(),
26354            )
26355        }
26356        __tmp.put_f32_le(self.p1x);
26357        __tmp.put_f32_le(self.p1y);
26358        __tmp.put_f32_le(self.p1z);
26359        __tmp.put_f32_le(self.p2x);
26360        __tmp.put_f32_le(self.p2y);
26361        __tmp.put_f32_le(self.p2z);
26362        __tmp.put_u8(self.target_system);
26363        __tmp.put_u8(self.target_component);
26364        __tmp.put_u8(self.frame as u8);
26365        if matches!(version, MavlinkVersion::V2) {
26366            let len = __tmp.len();
26367            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26368        } else {
26369            __tmp.len()
26370        }
26371    }
26372}
26373#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
26374#[doc = ""]
26375#[doc = "ID: 26"]
26376#[derive(Debug, Clone, PartialEq)]
26377#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26378#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26379#[cfg_attr(feature = "ts", derive(TS))]
26380#[cfg_attr(feature = "ts", ts(export))]
26381pub struct SCALED_IMU_DATA {
26382    #[doc = "Timestamp (time since system boot)."]
26383    pub time_boot_ms: u32,
26384    #[doc = "X acceleration"]
26385    pub xacc: i16,
26386    #[doc = "Y acceleration"]
26387    pub yacc: i16,
26388    #[doc = "Z acceleration"]
26389    pub zacc: i16,
26390    #[doc = "Angular speed around X axis"]
26391    pub xgyro: i16,
26392    #[doc = "Angular speed around Y axis"]
26393    pub ygyro: i16,
26394    #[doc = "Angular speed around Z axis"]
26395    pub zgyro: i16,
26396    #[doc = "X Magnetic field"]
26397    pub xmag: i16,
26398    #[doc = "Y Magnetic field"]
26399    pub ymag: i16,
26400    #[doc = "Z Magnetic field"]
26401    pub zmag: i16,
26402    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26403    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26404    pub temperature: i16,
26405}
26406impl SCALED_IMU_DATA {
26407    pub const ENCODED_LEN: usize = 24usize;
26408    pub const DEFAULT: Self = Self {
26409        time_boot_ms: 0_u32,
26410        xacc: 0_i16,
26411        yacc: 0_i16,
26412        zacc: 0_i16,
26413        xgyro: 0_i16,
26414        ygyro: 0_i16,
26415        zgyro: 0_i16,
26416        xmag: 0_i16,
26417        ymag: 0_i16,
26418        zmag: 0_i16,
26419        temperature: 0_i16,
26420    };
26421    #[cfg(feature = "arbitrary")]
26422    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26423        use arbitrary::{Arbitrary, Unstructured};
26424        let mut buf = [0u8; 1024];
26425        rng.fill_bytes(&mut buf);
26426        let mut unstructured = Unstructured::new(&buf);
26427        Self::arbitrary(&mut unstructured).unwrap_or_default()
26428    }
26429}
26430impl Default for SCALED_IMU_DATA {
26431    fn default() -> Self {
26432        Self::DEFAULT.clone()
26433    }
26434}
26435impl MessageData for SCALED_IMU_DATA {
26436    type Message = MavMessage;
26437    const ID: u32 = 26u32;
26438    const NAME: &'static str = "SCALED_IMU";
26439    const EXTRA_CRC: u8 = 170u8;
26440    const ENCODED_LEN: usize = 24usize;
26441    fn deser(
26442        _version: MavlinkVersion,
26443        __input: &[u8],
26444    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26445        let avail_len = __input.len();
26446        let mut payload_buf = [0; Self::ENCODED_LEN];
26447        let mut buf = if avail_len < Self::ENCODED_LEN {
26448            payload_buf[0..avail_len].copy_from_slice(__input);
26449            Bytes::new(&payload_buf)
26450        } else {
26451            Bytes::new(__input)
26452        };
26453        let mut __struct = Self::default();
26454        __struct.time_boot_ms = buf.get_u32_le();
26455        __struct.xacc = buf.get_i16_le();
26456        __struct.yacc = buf.get_i16_le();
26457        __struct.zacc = buf.get_i16_le();
26458        __struct.xgyro = buf.get_i16_le();
26459        __struct.ygyro = buf.get_i16_le();
26460        __struct.zgyro = buf.get_i16_le();
26461        __struct.xmag = buf.get_i16_le();
26462        __struct.ymag = buf.get_i16_le();
26463        __struct.zmag = buf.get_i16_le();
26464        __struct.temperature = buf.get_i16_le();
26465        Ok(__struct)
26466    }
26467    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26468        let mut __tmp = BytesMut::new(bytes);
26469        #[allow(clippy::absurd_extreme_comparisons)]
26470        #[allow(unused_comparisons)]
26471        if __tmp.remaining() < Self::ENCODED_LEN {
26472            panic!(
26473                "buffer is too small (need {} bytes, but got {})",
26474                Self::ENCODED_LEN,
26475                __tmp.remaining(),
26476            )
26477        }
26478        __tmp.put_u32_le(self.time_boot_ms);
26479        __tmp.put_i16_le(self.xacc);
26480        __tmp.put_i16_le(self.yacc);
26481        __tmp.put_i16_le(self.zacc);
26482        __tmp.put_i16_le(self.xgyro);
26483        __tmp.put_i16_le(self.ygyro);
26484        __tmp.put_i16_le(self.zgyro);
26485        __tmp.put_i16_le(self.xmag);
26486        __tmp.put_i16_le(self.ymag);
26487        __tmp.put_i16_le(self.zmag);
26488        if matches!(version, MavlinkVersion::V2) {
26489            __tmp.put_i16_le(self.temperature);
26490            let len = __tmp.len();
26491            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26492        } else {
26493            __tmp.len()
26494        }
26495    }
26496}
26497#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
26498#[doc = ""]
26499#[doc = "ID: 116"]
26500#[derive(Debug, Clone, PartialEq)]
26501#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26502#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26503#[cfg_attr(feature = "ts", derive(TS))]
26504#[cfg_attr(feature = "ts", ts(export))]
26505pub struct SCALED_IMU2_DATA {
26506    #[doc = "Timestamp (time since system boot)."]
26507    pub time_boot_ms: u32,
26508    #[doc = "X acceleration"]
26509    pub xacc: i16,
26510    #[doc = "Y acceleration"]
26511    pub yacc: i16,
26512    #[doc = "Z acceleration"]
26513    pub zacc: i16,
26514    #[doc = "Angular speed around X axis"]
26515    pub xgyro: i16,
26516    #[doc = "Angular speed around Y axis"]
26517    pub ygyro: i16,
26518    #[doc = "Angular speed around Z axis"]
26519    pub zgyro: i16,
26520    #[doc = "X Magnetic field"]
26521    pub xmag: i16,
26522    #[doc = "Y Magnetic field"]
26523    pub ymag: i16,
26524    #[doc = "Z Magnetic field"]
26525    pub zmag: i16,
26526    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26527    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26528    pub temperature: i16,
26529}
26530impl SCALED_IMU2_DATA {
26531    pub const ENCODED_LEN: usize = 24usize;
26532    pub const DEFAULT: Self = Self {
26533        time_boot_ms: 0_u32,
26534        xacc: 0_i16,
26535        yacc: 0_i16,
26536        zacc: 0_i16,
26537        xgyro: 0_i16,
26538        ygyro: 0_i16,
26539        zgyro: 0_i16,
26540        xmag: 0_i16,
26541        ymag: 0_i16,
26542        zmag: 0_i16,
26543        temperature: 0_i16,
26544    };
26545    #[cfg(feature = "arbitrary")]
26546    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26547        use arbitrary::{Arbitrary, Unstructured};
26548        let mut buf = [0u8; 1024];
26549        rng.fill_bytes(&mut buf);
26550        let mut unstructured = Unstructured::new(&buf);
26551        Self::arbitrary(&mut unstructured).unwrap_or_default()
26552    }
26553}
26554impl Default for SCALED_IMU2_DATA {
26555    fn default() -> Self {
26556        Self::DEFAULT.clone()
26557    }
26558}
26559impl MessageData for SCALED_IMU2_DATA {
26560    type Message = MavMessage;
26561    const ID: u32 = 116u32;
26562    const NAME: &'static str = "SCALED_IMU2";
26563    const EXTRA_CRC: u8 = 76u8;
26564    const ENCODED_LEN: usize = 24usize;
26565    fn deser(
26566        _version: MavlinkVersion,
26567        __input: &[u8],
26568    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26569        let avail_len = __input.len();
26570        let mut payload_buf = [0; Self::ENCODED_LEN];
26571        let mut buf = if avail_len < Self::ENCODED_LEN {
26572            payload_buf[0..avail_len].copy_from_slice(__input);
26573            Bytes::new(&payload_buf)
26574        } else {
26575            Bytes::new(__input)
26576        };
26577        let mut __struct = Self::default();
26578        __struct.time_boot_ms = buf.get_u32_le();
26579        __struct.xacc = buf.get_i16_le();
26580        __struct.yacc = buf.get_i16_le();
26581        __struct.zacc = buf.get_i16_le();
26582        __struct.xgyro = buf.get_i16_le();
26583        __struct.ygyro = buf.get_i16_le();
26584        __struct.zgyro = buf.get_i16_le();
26585        __struct.xmag = buf.get_i16_le();
26586        __struct.ymag = buf.get_i16_le();
26587        __struct.zmag = buf.get_i16_le();
26588        __struct.temperature = buf.get_i16_le();
26589        Ok(__struct)
26590    }
26591    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26592        let mut __tmp = BytesMut::new(bytes);
26593        #[allow(clippy::absurd_extreme_comparisons)]
26594        #[allow(unused_comparisons)]
26595        if __tmp.remaining() < Self::ENCODED_LEN {
26596            panic!(
26597                "buffer is too small (need {} bytes, but got {})",
26598                Self::ENCODED_LEN,
26599                __tmp.remaining(),
26600            )
26601        }
26602        __tmp.put_u32_le(self.time_boot_ms);
26603        __tmp.put_i16_le(self.xacc);
26604        __tmp.put_i16_le(self.yacc);
26605        __tmp.put_i16_le(self.zacc);
26606        __tmp.put_i16_le(self.xgyro);
26607        __tmp.put_i16_le(self.ygyro);
26608        __tmp.put_i16_le(self.zgyro);
26609        __tmp.put_i16_le(self.xmag);
26610        __tmp.put_i16_le(self.ymag);
26611        __tmp.put_i16_le(self.zmag);
26612        if matches!(version, MavlinkVersion::V2) {
26613            __tmp.put_i16_le(self.temperature);
26614            let len = __tmp.len();
26615            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26616        } else {
26617            __tmp.len()
26618        }
26619    }
26620}
26621#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
26622#[doc = ""]
26623#[doc = "ID: 129"]
26624#[derive(Debug, Clone, PartialEq)]
26625#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26626#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26627#[cfg_attr(feature = "ts", derive(TS))]
26628#[cfg_attr(feature = "ts", ts(export))]
26629pub struct SCALED_IMU3_DATA {
26630    #[doc = "Timestamp (time since system boot)."]
26631    pub time_boot_ms: u32,
26632    #[doc = "X acceleration"]
26633    pub xacc: i16,
26634    #[doc = "Y acceleration"]
26635    pub yacc: i16,
26636    #[doc = "Z acceleration"]
26637    pub zacc: i16,
26638    #[doc = "Angular speed around X axis"]
26639    pub xgyro: i16,
26640    #[doc = "Angular speed around Y axis"]
26641    pub ygyro: i16,
26642    #[doc = "Angular speed around Z axis"]
26643    pub zgyro: i16,
26644    #[doc = "X Magnetic field"]
26645    pub xmag: i16,
26646    #[doc = "Y Magnetic field"]
26647    pub ymag: i16,
26648    #[doc = "Z Magnetic field"]
26649    pub zmag: i16,
26650    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26651    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26652    pub temperature: i16,
26653}
26654impl SCALED_IMU3_DATA {
26655    pub const ENCODED_LEN: usize = 24usize;
26656    pub const DEFAULT: Self = Self {
26657        time_boot_ms: 0_u32,
26658        xacc: 0_i16,
26659        yacc: 0_i16,
26660        zacc: 0_i16,
26661        xgyro: 0_i16,
26662        ygyro: 0_i16,
26663        zgyro: 0_i16,
26664        xmag: 0_i16,
26665        ymag: 0_i16,
26666        zmag: 0_i16,
26667        temperature: 0_i16,
26668    };
26669    #[cfg(feature = "arbitrary")]
26670    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26671        use arbitrary::{Arbitrary, Unstructured};
26672        let mut buf = [0u8; 1024];
26673        rng.fill_bytes(&mut buf);
26674        let mut unstructured = Unstructured::new(&buf);
26675        Self::arbitrary(&mut unstructured).unwrap_or_default()
26676    }
26677}
26678impl Default for SCALED_IMU3_DATA {
26679    fn default() -> Self {
26680        Self::DEFAULT.clone()
26681    }
26682}
26683impl MessageData for SCALED_IMU3_DATA {
26684    type Message = MavMessage;
26685    const ID: u32 = 129u32;
26686    const NAME: &'static str = "SCALED_IMU3";
26687    const EXTRA_CRC: u8 = 46u8;
26688    const ENCODED_LEN: usize = 24usize;
26689    fn deser(
26690        _version: MavlinkVersion,
26691        __input: &[u8],
26692    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26693        let avail_len = __input.len();
26694        let mut payload_buf = [0; Self::ENCODED_LEN];
26695        let mut buf = if avail_len < Self::ENCODED_LEN {
26696            payload_buf[0..avail_len].copy_from_slice(__input);
26697            Bytes::new(&payload_buf)
26698        } else {
26699            Bytes::new(__input)
26700        };
26701        let mut __struct = Self::default();
26702        __struct.time_boot_ms = buf.get_u32_le();
26703        __struct.xacc = buf.get_i16_le();
26704        __struct.yacc = buf.get_i16_le();
26705        __struct.zacc = buf.get_i16_le();
26706        __struct.xgyro = buf.get_i16_le();
26707        __struct.ygyro = buf.get_i16_le();
26708        __struct.zgyro = buf.get_i16_le();
26709        __struct.xmag = buf.get_i16_le();
26710        __struct.ymag = buf.get_i16_le();
26711        __struct.zmag = buf.get_i16_le();
26712        __struct.temperature = buf.get_i16_le();
26713        Ok(__struct)
26714    }
26715    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26716        let mut __tmp = BytesMut::new(bytes);
26717        #[allow(clippy::absurd_extreme_comparisons)]
26718        #[allow(unused_comparisons)]
26719        if __tmp.remaining() < Self::ENCODED_LEN {
26720            panic!(
26721                "buffer is too small (need {} bytes, but got {})",
26722                Self::ENCODED_LEN,
26723                __tmp.remaining(),
26724            )
26725        }
26726        __tmp.put_u32_le(self.time_boot_ms);
26727        __tmp.put_i16_le(self.xacc);
26728        __tmp.put_i16_le(self.yacc);
26729        __tmp.put_i16_le(self.zacc);
26730        __tmp.put_i16_le(self.xgyro);
26731        __tmp.put_i16_le(self.ygyro);
26732        __tmp.put_i16_le(self.zgyro);
26733        __tmp.put_i16_le(self.xmag);
26734        __tmp.put_i16_le(self.ymag);
26735        __tmp.put_i16_le(self.zmag);
26736        if matches!(version, MavlinkVersion::V2) {
26737            __tmp.put_i16_le(self.temperature);
26738            let len = __tmp.len();
26739            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26740        } else {
26741            __tmp.len()
26742        }
26743    }
26744}
26745#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
26746#[doc = ""]
26747#[doc = "ID: 29"]
26748#[derive(Debug, Clone, PartialEq)]
26749#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26750#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26751#[cfg_attr(feature = "ts", derive(TS))]
26752#[cfg_attr(feature = "ts", ts(export))]
26753pub struct SCALED_PRESSURE_DATA {
26754    #[doc = "Timestamp (time since system boot)."]
26755    pub time_boot_ms: u32,
26756    #[doc = "Absolute pressure"]
26757    pub press_abs: f32,
26758    #[doc = "Differential pressure 1"]
26759    pub press_diff: f32,
26760    #[doc = "Absolute pressure temperature"]
26761    pub temperature: i16,
26762    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26763    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26764    pub temperature_press_diff: i16,
26765}
26766impl SCALED_PRESSURE_DATA {
26767    pub const ENCODED_LEN: usize = 16usize;
26768    pub const DEFAULT: Self = Self {
26769        time_boot_ms: 0_u32,
26770        press_abs: 0.0_f32,
26771        press_diff: 0.0_f32,
26772        temperature: 0_i16,
26773        temperature_press_diff: 0_i16,
26774    };
26775    #[cfg(feature = "arbitrary")]
26776    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26777        use arbitrary::{Arbitrary, Unstructured};
26778        let mut buf = [0u8; 1024];
26779        rng.fill_bytes(&mut buf);
26780        let mut unstructured = Unstructured::new(&buf);
26781        Self::arbitrary(&mut unstructured).unwrap_or_default()
26782    }
26783}
26784impl Default for SCALED_PRESSURE_DATA {
26785    fn default() -> Self {
26786        Self::DEFAULT.clone()
26787    }
26788}
26789impl MessageData for SCALED_PRESSURE_DATA {
26790    type Message = MavMessage;
26791    const ID: u32 = 29u32;
26792    const NAME: &'static str = "SCALED_PRESSURE";
26793    const EXTRA_CRC: u8 = 115u8;
26794    const ENCODED_LEN: usize = 16usize;
26795    fn deser(
26796        _version: MavlinkVersion,
26797        __input: &[u8],
26798    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26799        let avail_len = __input.len();
26800        let mut payload_buf = [0; Self::ENCODED_LEN];
26801        let mut buf = if avail_len < Self::ENCODED_LEN {
26802            payload_buf[0..avail_len].copy_from_slice(__input);
26803            Bytes::new(&payload_buf)
26804        } else {
26805            Bytes::new(__input)
26806        };
26807        let mut __struct = Self::default();
26808        __struct.time_boot_ms = buf.get_u32_le();
26809        __struct.press_abs = buf.get_f32_le();
26810        __struct.press_diff = buf.get_f32_le();
26811        __struct.temperature = buf.get_i16_le();
26812        __struct.temperature_press_diff = buf.get_i16_le();
26813        Ok(__struct)
26814    }
26815    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26816        let mut __tmp = BytesMut::new(bytes);
26817        #[allow(clippy::absurd_extreme_comparisons)]
26818        #[allow(unused_comparisons)]
26819        if __tmp.remaining() < Self::ENCODED_LEN {
26820            panic!(
26821                "buffer is too small (need {} bytes, but got {})",
26822                Self::ENCODED_LEN,
26823                __tmp.remaining(),
26824            )
26825        }
26826        __tmp.put_u32_le(self.time_boot_ms);
26827        __tmp.put_f32_le(self.press_abs);
26828        __tmp.put_f32_le(self.press_diff);
26829        __tmp.put_i16_le(self.temperature);
26830        if matches!(version, MavlinkVersion::V2) {
26831            __tmp.put_i16_le(self.temperature_press_diff);
26832            let len = __tmp.len();
26833            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26834        } else {
26835            __tmp.len()
26836        }
26837    }
26838}
26839#[doc = "Barometer readings for 2nd barometer."]
26840#[doc = ""]
26841#[doc = "ID: 137"]
26842#[derive(Debug, Clone, PartialEq)]
26843#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26844#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26845#[cfg_attr(feature = "ts", derive(TS))]
26846#[cfg_attr(feature = "ts", ts(export))]
26847pub struct SCALED_PRESSURE2_DATA {
26848    #[doc = "Timestamp (time since system boot)."]
26849    pub time_boot_ms: u32,
26850    #[doc = "Absolute pressure"]
26851    pub press_abs: f32,
26852    #[doc = "Differential pressure"]
26853    pub press_diff: f32,
26854    #[doc = "Absolute pressure temperature"]
26855    pub temperature: i16,
26856    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26857    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26858    pub temperature_press_diff: i16,
26859}
26860impl SCALED_PRESSURE2_DATA {
26861    pub const ENCODED_LEN: usize = 16usize;
26862    pub const DEFAULT: Self = Self {
26863        time_boot_ms: 0_u32,
26864        press_abs: 0.0_f32,
26865        press_diff: 0.0_f32,
26866        temperature: 0_i16,
26867        temperature_press_diff: 0_i16,
26868    };
26869    #[cfg(feature = "arbitrary")]
26870    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26871        use arbitrary::{Arbitrary, Unstructured};
26872        let mut buf = [0u8; 1024];
26873        rng.fill_bytes(&mut buf);
26874        let mut unstructured = Unstructured::new(&buf);
26875        Self::arbitrary(&mut unstructured).unwrap_or_default()
26876    }
26877}
26878impl Default for SCALED_PRESSURE2_DATA {
26879    fn default() -> Self {
26880        Self::DEFAULT.clone()
26881    }
26882}
26883impl MessageData for SCALED_PRESSURE2_DATA {
26884    type Message = MavMessage;
26885    const ID: u32 = 137u32;
26886    const NAME: &'static str = "SCALED_PRESSURE2";
26887    const EXTRA_CRC: u8 = 195u8;
26888    const ENCODED_LEN: usize = 16usize;
26889    fn deser(
26890        _version: MavlinkVersion,
26891        __input: &[u8],
26892    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26893        let avail_len = __input.len();
26894        let mut payload_buf = [0; Self::ENCODED_LEN];
26895        let mut buf = if avail_len < Self::ENCODED_LEN {
26896            payload_buf[0..avail_len].copy_from_slice(__input);
26897            Bytes::new(&payload_buf)
26898        } else {
26899            Bytes::new(__input)
26900        };
26901        let mut __struct = Self::default();
26902        __struct.time_boot_ms = buf.get_u32_le();
26903        __struct.press_abs = buf.get_f32_le();
26904        __struct.press_diff = buf.get_f32_le();
26905        __struct.temperature = buf.get_i16_le();
26906        __struct.temperature_press_diff = buf.get_i16_le();
26907        Ok(__struct)
26908    }
26909    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26910        let mut __tmp = BytesMut::new(bytes);
26911        #[allow(clippy::absurd_extreme_comparisons)]
26912        #[allow(unused_comparisons)]
26913        if __tmp.remaining() < Self::ENCODED_LEN {
26914            panic!(
26915                "buffer is too small (need {} bytes, but got {})",
26916                Self::ENCODED_LEN,
26917                __tmp.remaining(),
26918            )
26919        }
26920        __tmp.put_u32_le(self.time_boot_ms);
26921        __tmp.put_f32_le(self.press_abs);
26922        __tmp.put_f32_le(self.press_diff);
26923        __tmp.put_i16_le(self.temperature);
26924        if matches!(version, MavlinkVersion::V2) {
26925            __tmp.put_i16_le(self.temperature_press_diff);
26926            let len = __tmp.len();
26927            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26928        } else {
26929            __tmp.len()
26930        }
26931    }
26932}
26933#[doc = "Barometer readings for 3rd barometer."]
26934#[doc = ""]
26935#[doc = "ID: 143"]
26936#[derive(Debug, Clone, PartialEq)]
26937#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26938#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26939#[cfg_attr(feature = "ts", derive(TS))]
26940#[cfg_attr(feature = "ts", ts(export))]
26941pub struct SCALED_PRESSURE3_DATA {
26942    #[doc = "Timestamp (time since system boot)."]
26943    pub time_boot_ms: u32,
26944    #[doc = "Absolute pressure"]
26945    pub press_abs: f32,
26946    #[doc = "Differential pressure"]
26947    pub press_diff: f32,
26948    #[doc = "Absolute pressure temperature"]
26949    pub temperature: i16,
26950    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26951    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26952    pub temperature_press_diff: i16,
26953}
26954impl SCALED_PRESSURE3_DATA {
26955    pub const ENCODED_LEN: usize = 16usize;
26956    pub const DEFAULT: Self = Self {
26957        time_boot_ms: 0_u32,
26958        press_abs: 0.0_f32,
26959        press_diff: 0.0_f32,
26960        temperature: 0_i16,
26961        temperature_press_diff: 0_i16,
26962    };
26963    #[cfg(feature = "arbitrary")]
26964    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26965        use arbitrary::{Arbitrary, Unstructured};
26966        let mut buf = [0u8; 1024];
26967        rng.fill_bytes(&mut buf);
26968        let mut unstructured = Unstructured::new(&buf);
26969        Self::arbitrary(&mut unstructured).unwrap_or_default()
26970    }
26971}
26972impl Default for SCALED_PRESSURE3_DATA {
26973    fn default() -> Self {
26974        Self::DEFAULT.clone()
26975    }
26976}
26977impl MessageData for SCALED_PRESSURE3_DATA {
26978    type Message = MavMessage;
26979    const ID: u32 = 143u32;
26980    const NAME: &'static str = "SCALED_PRESSURE3";
26981    const EXTRA_CRC: u8 = 131u8;
26982    const ENCODED_LEN: usize = 16usize;
26983    fn deser(
26984        _version: MavlinkVersion,
26985        __input: &[u8],
26986    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26987        let avail_len = __input.len();
26988        let mut payload_buf = [0; Self::ENCODED_LEN];
26989        let mut buf = if avail_len < Self::ENCODED_LEN {
26990            payload_buf[0..avail_len].copy_from_slice(__input);
26991            Bytes::new(&payload_buf)
26992        } else {
26993            Bytes::new(__input)
26994        };
26995        let mut __struct = Self::default();
26996        __struct.time_boot_ms = buf.get_u32_le();
26997        __struct.press_abs = buf.get_f32_le();
26998        __struct.press_diff = buf.get_f32_le();
26999        __struct.temperature = buf.get_i16_le();
27000        __struct.temperature_press_diff = buf.get_i16_le();
27001        Ok(__struct)
27002    }
27003    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27004        let mut __tmp = BytesMut::new(bytes);
27005        #[allow(clippy::absurd_extreme_comparisons)]
27006        #[allow(unused_comparisons)]
27007        if __tmp.remaining() < Self::ENCODED_LEN {
27008            panic!(
27009                "buffer is too small (need {} bytes, but got {})",
27010                Self::ENCODED_LEN,
27011                __tmp.remaining(),
27012            )
27013        }
27014        __tmp.put_u32_le(self.time_boot_ms);
27015        __tmp.put_f32_le(self.press_abs);
27016        __tmp.put_f32_le(self.press_diff);
27017        __tmp.put_i16_le(self.temperature);
27018        if matches!(version, MavlinkVersion::V2) {
27019            __tmp.put_i16_le(self.temperature_press_diff);
27020            let len = __tmp.len();
27021            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27022        } else {
27023            __tmp.len()
27024        }
27025    }
27026}
27027#[doc = "This message is emitted as response to SCRIPT_REQUEST_LIST by the MAV to get the number of mission scripts."]
27028#[doc = ""]
27029#[doc = "ID: 183"]
27030#[derive(Debug, Clone, PartialEq)]
27031#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27032#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27033#[cfg_attr(feature = "ts", derive(TS))]
27034#[cfg_attr(feature = "ts", ts(export))]
27035pub struct SCRIPT_COUNT_DATA {
27036    #[doc = "Number of script items in the sequence"]
27037    pub count: u16,
27038    #[doc = "System ID"]
27039    pub target_system: u8,
27040    #[doc = "Component ID"]
27041    pub target_component: u8,
27042}
27043impl SCRIPT_COUNT_DATA {
27044    pub const ENCODED_LEN: usize = 4usize;
27045    pub const DEFAULT: Self = Self {
27046        count: 0_u16,
27047        target_system: 0_u8,
27048        target_component: 0_u8,
27049    };
27050    #[cfg(feature = "arbitrary")]
27051    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27052        use arbitrary::{Arbitrary, Unstructured};
27053        let mut buf = [0u8; 1024];
27054        rng.fill_bytes(&mut buf);
27055        let mut unstructured = Unstructured::new(&buf);
27056        Self::arbitrary(&mut unstructured).unwrap_or_default()
27057    }
27058}
27059impl Default for SCRIPT_COUNT_DATA {
27060    fn default() -> Self {
27061        Self::DEFAULT.clone()
27062    }
27063}
27064impl MessageData for SCRIPT_COUNT_DATA {
27065    type Message = MavMessage;
27066    const ID: u32 = 183u32;
27067    const NAME: &'static str = "SCRIPT_COUNT";
27068    const EXTRA_CRC: u8 = 186u8;
27069    const ENCODED_LEN: usize = 4usize;
27070    fn deser(
27071        _version: MavlinkVersion,
27072        __input: &[u8],
27073    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27074        let avail_len = __input.len();
27075        let mut payload_buf = [0; Self::ENCODED_LEN];
27076        let mut buf = if avail_len < Self::ENCODED_LEN {
27077            payload_buf[0..avail_len].copy_from_slice(__input);
27078            Bytes::new(&payload_buf)
27079        } else {
27080            Bytes::new(__input)
27081        };
27082        let mut __struct = Self::default();
27083        __struct.count = buf.get_u16_le();
27084        __struct.target_system = buf.get_u8();
27085        __struct.target_component = buf.get_u8();
27086        Ok(__struct)
27087    }
27088    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27089        let mut __tmp = BytesMut::new(bytes);
27090        #[allow(clippy::absurd_extreme_comparisons)]
27091        #[allow(unused_comparisons)]
27092        if __tmp.remaining() < Self::ENCODED_LEN {
27093            panic!(
27094                "buffer is too small (need {} bytes, but got {})",
27095                Self::ENCODED_LEN,
27096                __tmp.remaining(),
27097            )
27098        }
27099        __tmp.put_u16_le(self.count);
27100        __tmp.put_u8(self.target_system);
27101        __tmp.put_u8(self.target_component);
27102        if matches!(version, MavlinkVersion::V2) {
27103            let len = __tmp.len();
27104            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27105        } else {
27106            __tmp.len()
27107        }
27108    }
27109}
27110#[doc = "This message informs about the currently active SCRIPT."]
27111#[doc = ""]
27112#[doc = "ID: 184"]
27113#[derive(Debug, Clone, PartialEq)]
27114#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27115#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27116#[cfg_attr(feature = "ts", derive(TS))]
27117#[cfg_attr(feature = "ts", ts(export))]
27118pub struct SCRIPT_CURRENT_DATA {
27119    #[doc = "Active Sequence"]
27120    pub seq: u16,
27121}
27122impl SCRIPT_CURRENT_DATA {
27123    pub const ENCODED_LEN: usize = 2usize;
27124    pub const DEFAULT: Self = Self { seq: 0_u16 };
27125    #[cfg(feature = "arbitrary")]
27126    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27127        use arbitrary::{Arbitrary, Unstructured};
27128        let mut buf = [0u8; 1024];
27129        rng.fill_bytes(&mut buf);
27130        let mut unstructured = Unstructured::new(&buf);
27131        Self::arbitrary(&mut unstructured).unwrap_or_default()
27132    }
27133}
27134impl Default for SCRIPT_CURRENT_DATA {
27135    fn default() -> Self {
27136        Self::DEFAULT.clone()
27137    }
27138}
27139impl MessageData for SCRIPT_CURRENT_DATA {
27140    type Message = MavMessage;
27141    const ID: u32 = 184u32;
27142    const NAME: &'static str = "SCRIPT_CURRENT";
27143    const EXTRA_CRC: u8 = 40u8;
27144    const ENCODED_LEN: usize = 2usize;
27145    fn deser(
27146        _version: MavlinkVersion,
27147        __input: &[u8],
27148    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27149        let avail_len = __input.len();
27150        let mut payload_buf = [0; Self::ENCODED_LEN];
27151        let mut buf = if avail_len < Self::ENCODED_LEN {
27152            payload_buf[0..avail_len].copy_from_slice(__input);
27153            Bytes::new(&payload_buf)
27154        } else {
27155            Bytes::new(__input)
27156        };
27157        let mut __struct = Self::default();
27158        __struct.seq = buf.get_u16_le();
27159        Ok(__struct)
27160    }
27161    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27162        let mut __tmp = BytesMut::new(bytes);
27163        #[allow(clippy::absurd_extreme_comparisons)]
27164        #[allow(unused_comparisons)]
27165        if __tmp.remaining() < Self::ENCODED_LEN {
27166            panic!(
27167                "buffer is too small (need {} bytes, but got {})",
27168                Self::ENCODED_LEN,
27169                __tmp.remaining(),
27170            )
27171        }
27172        __tmp.put_u16_le(self.seq);
27173        if matches!(version, MavlinkVersion::V2) {
27174            let len = __tmp.len();
27175            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27176        } else {
27177            __tmp.len()
27178        }
27179    }
27180}
27181#[doc = "Message encoding a mission script item. This message is emitted upon a request for the next script item."]
27182#[doc = ""]
27183#[doc = "ID: 180"]
27184#[derive(Debug, Clone, PartialEq)]
27185#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27186#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27187#[cfg_attr(feature = "ts", derive(TS))]
27188#[cfg_attr(feature = "ts", ts(export))]
27189pub struct SCRIPT_ITEM_DATA {
27190    #[doc = "Sequence"]
27191    pub seq: u16,
27192    #[doc = "System ID"]
27193    pub target_system: u8,
27194    #[doc = "Component ID"]
27195    pub target_component: u8,
27196    #[doc = "The name of the mission script, NULL terminated."]
27197    #[cfg_attr(feature = "ts", ts(type = "string"))]
27198    pub name: CharArray<50>,
27199}
27200impl SCRIPT_ITEM_DATA {
27201    pub const ENCODED_LEN: usize = 54usize;
27202    pub const DEFAULT: Self = Self {
27203        seq: 0_u16,
27204        target_system: 0_u8,
27205        target_component: 0_u8,
27206        name: CharArray::new([0_u8; 50usize]),
27207    };
27208    #[cfg(feature = "arbitrary")]
27209    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27210        use arbitrary::{Arbitrary, Unstructured};
27211        let mut buf = [0u8; 1024];
27212        rng.fill_bytes(&mut buf);
27213        let mut unstructured = Unstructured::new(&buf);
27214        Self::arbitrary(&mut unstructured).unwrap_or_default()
27215    }
27216}
27217impl Default for SCRIPT_ITEM_DATA {
27218    fn default() -> Self {
27219        Self::DEFAULT.clone()
27220    }
27221}
27222impl MessageData for SCRIPT_ITEM_DATA {
27223    type Message = MavMessage;
27224    const ID: u32 = 180u32;
27225    const NAME: &'static str = "SCRIPT_ITEM";
27226    const EXTRA_CRC: u8 = 231u8;
27227    const ENCODED_LEN: usize = 54usize;
27228    fn deser(
27229        _version: MavlinkVersion,
27230        __input: &[u8],
27231    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27232        let avail_len = __input.len();
27233        let mut payload_buf = [0; Self::ENCODED_LEN];
27234        let mut buf = if avail_len < Self::ENCODED_LEN {
27235            payload_buf[0..avail_len].copy_from_slice(__input);
27236            Bytes::new(&payload_buf)
27237        } else {
27238            Bytes::new(__input)
27239        };
27240        let mut __struct = Self::default();
27241        __struct.seq = buf.get_u16_le();
27242        __struct.target_system = buf.get_u8();
27243        __struct.target_component = buf.get_u8();
27244        let mut tmp = [0_u8; 50usize];
27245        for v in &mut tmp {
27246            *v = buf.get_u8();
27247        }
27248        __struct.name = CharArray::new(tmp);
27249        Ok(__struct)
27250    }
27251    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27252        let mut __tmp = BytesMut::new(bytes);
27253        #[allow(clippy::absurd_extreme_comparisons)]
27254        #[allow(unused_comparisons)]
27255        if __tmp.remaining() < Self::ENCODED_LEN {
27256            panic!(
27257                "buffer is too small (need {} bytes, but got {})",
27258                Self::ENCODED_LEN,
27259                __tmp.remaining(),
27260            )
27261        }
27262        __tmp.put_u16_le(self.seq);
27263        __tmp.put_u8(self.target_system);
27264        __tmp.put_u8(self.target_component);
27265        for val in &self.name {
27266            __tmp.put_u8(*val);
27267        }
27268        if matches!(version, MavlinkVersion::V2) {
27269            let len = __tmp.len();
27270            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27271        } else {
27272            __tmp.len()
27273        }
27274    }
27275}
27276#[doc = "Request script item with the sequence number seq. The response of the system to this message should be a SCRIPT_ITEM message."]
27277#[doc = ""]
27278#[doc = "ID: 181"]
27279#[derive(Debug, Clone, PartialEq)]
27280#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27281#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27282#[cfg_attr(feature = "ts", derive(TS))]
27283#[cfg_attr(feature = "ts", ts(export))]
27284pub struct SCRIPT_REQUEST_DATA {
27285    #[doc = "Sequence"]
27286    pub seq: u16,
27287    #[doc = "System ID"]
27288    pub target_system: u8,
27289    #[doc = "Component ID"]
27290    pub target_component: u8,
27291}
27292impl SCRIPT_REQUEST_DATA {
27293    pub const ENCODED_LEN: usize = 4usize;
27294    pub const DEFAULT: Self = Self {
27295        seq: 0_u16,
27296        target_system: 0_u8,
27297        target_component: 0_u8,
27298    };
27299    #[cfg(feature = "arbitrary")]
27300    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27301        use arbitrary::{Arbitrary, Unstructured};
27302        let mut buf = [0u8; 1024];
27303        rng.fill_bytes(&mut buf);
27304        let mut unstructured = Unstructured::new(&buf);
27305        Self::arbitrary(&mut unstructured).unwrap_or_default()
27306    }
27307}
27308impl Default for SCRIPT_REQUEST_DATA {
27309    fn default() -> Self {
27310        Self::DEFAULT.clone()
27311    }
27312}
27313impl MessageData for SCRIPT_REQUEST_DATA {
27314    type Message = MavMessage;
27315    const ID: u32 = 181u32;
27316    const NAME: &'static str = "SCRIPT_REQUEST";
27317    const EXTRA_CRC: u8 = 129u8;
27318    const ENCODED_LEN: usize = 4usize;
27319    fn deser(
27320        _version: MavlinkVersion,
27321        __input: &[u8],
27322    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27323        let avail_len = __input.len();
27324        let mut payload_buf = [0; Self::ENCODED_LEN];
27325        let mut buf = if avail_len < Self::ENCODED_LEN {
27326            payload_buf[0..avail_len].copy_from_slice(__input);
27327            Bytes::new(&payload_buf)
27328        } else {
27329            Bytes::new(__input)
27330        };
27331        let mut __struct = Self::default();
27332        __struct.seq = buf.get_u16_le();
27333        __struct.target_system = buf.get_u8();
27334        __struct.target_component = buf.get_u8();
27335        Ok(__struct)
27336    }
27337    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27338        let mut __tmp = BytesMut::new(bytes);
27339        #[allow(clippy::absurd_extreme_comparisons)]
27340        #[allow(unused_comparisons)]
27341        if __tmp.remaining() < Self::ENCODED_LEN {
27342            panic!(
27343                "buffer is too small (need {} bytes, but got {})",
27344                Self::ENCODED_LEN,
27345                __tmp.remaining(),
27346            )
27347        }
27348        __tmp.put_u16_le(self.seq);
27349        __tmp.put_u8(self.target_system);
27350        __tmp.put_u8(self.target_component);
27351        if matches!(version, MavlinkVersion::V2) {
27352            let len = __tmp.len();
27353            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27354        } else {
27355            __tmp.len()
27356        }
27357    }
27358}
27359#[doc = "Request the overall list of mission items from the system/component."]
27360#[doc = ""]
27361#[doc = "ID: 182"]
27362#[derive(Debug, Clone, PartialEq)]
27363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27364#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27365#[cfg_attr(feature = "ts", derive(TS))]
27366#[cfg_attr(feature = "ts", ts(export))]
27367pub struct SCRIPT_REQUEST_LIST_DATA {
27368    #[doc = "System ID"]
27369    pub target_system: u8,
27370    #[doc = "Component ID"]
27371    pub target_component: u8,
27372}
27373impl SCRIPT_REQUEST_LIST_DATA {
27374    pub const ENCODED_LEN: usize = 2usize;
27375    pub const DEFAULT: Self = Self {
27376        target_system: 0_u8,
27377        target_component: 0_u8,
27378    };
27379    #[cfg(feature = "arbitrary")]
27380    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27381        use arbitrary::{Arbitrary, Unstructured};
27382        let mut buf = [0u8; 1024];
27383        rng.fill_bytes(&mut buf);
27384        let mut unstructured = Unstructured::new(&buf);
27385        Self::arbitrary(&mut unstructured).unwrap_or_default()
27386    }
27387}
27388impl Default for SCRIPT_REQUEST_LIST_DATA {
27389    fn default() -> Self {
27390        Self::DEFAULT.clone()
27391    }
27392}
27393impl MessageData for SCRIPT_REQUEST_LIST_DATA {
27394    type Message = MavMessage;
27395    const ID: u32 = 182u32;
27396    const NAME: &'static str = "SCRIPT_REQUEST_LIST";
27397    const EXTRA_CRC: u8 = 115u8;
27398    const ENCODED_LEN: usize = 2usize;
27399    fn deser(
27400        _version: MavlinkVersion,
27401        __input: &[u8],
27402    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27403        let avail_len = __input.len();
27404        let mut payload_buf = [0; Self::ENCODED_LEN];
27405        let mut buf = if avail_len < Self::ENCODED_LEN {
27406            payload_buf[0..avail_len].copy_from_slice(__input);
27407            Bytes::new(&payload_buf)
27408        } else {
27409            Bytes::new(__input)
27410        };
27411        let mut __struct = Self::default();
27412        __struct.target_system = buf.get_u8();
27413        __struct.target_component = buf.get_u8();
27414        Ok(__struct)
27415    }
27416    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27417        let mut __tmp = BytesMut::new(bytes);
27418        #[allow(clippy::absurd_extreme_comparisons)]
27419        #[allow(unused_comparisons)]
27420        if __tmp.remaining() < Self::ENCODED_LEN {
27421            panic!(
27422                "buffer is too small (need {} bytes, but got {})",
27423                Self::ENCODED_LEN,
27424                __tmp.remaining(),
27425            )
27426        }
27427        __tmp.put_u8(self.target_system);
27428        __tmp.put_u8(self.target_component);
27429        if matches!(version, MavlinkVersion::V2) {
27430            let len = __tmp.len();
27431            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27432        } else {
27433            __tmp.len()
27434        }
27435    }
27436}
27437#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
27438#[doc = ""]
27439#[doc = "ID: 126"]
27440#[derive(Debug, Clone, PartialEq)]
27441#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27442#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27443#[cfg_attr(feature = "ts", derive(TS))]
27444#[cfg_attr(feature = "ts", ts(export))]
27445pub struct SERIAL_CONTROL_DATA {
27446    #[doc = "Baudrate of transfer. Zero means no change."]
27447    pub baudrate: u32,
27448    #[doc = "Timeout for reply data"]
27449    pub timeout: u16,
27450    #[doc = "Serial control device type."]
27451    pub device: SerialControlDev,
27452    #[doc = "Bitmap of serial control flags."]
27453    pub flags: SerialControlFlag,
27454    #[doc = "how many bytes in this transfer"]
27455    pub count: u8,
27456    #[doc = "serial data"]
27457    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27458    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27459    pub data: [u8; 70],
27460    #[doc = "System ID"]
27461    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27462    pub target_system: u8,
27463    #[doc = "Component ID"]
27464    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27465    pub target_component: u8,
27466}
27467impl SERIAL_CONTROL_DATA {
27468    pub const ENCODED_LEN: usize = 81usize;
27469    pub const DEFAULT: Self = Self {
27470        baudrate: 0_u32,
27471        timeout: 0_u16,
27472        device: SerialControlDev::DEFAULT,
27473        flags: SerialControlFlag::DEFAULT,
27474        count: 0_u8,
27475        data: [0_u8; 70usize],
27476        target_system: 0_u8,
27477        target_component: 0_u8,
27478    };
27479    #[cfg(feature = "arbitrary")]
27480    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27481        use arbitrary::{Arbitrary, Unstructured};
27482        let mut buf = [0u8; 1024];
27483        rng.fill_bytes(&mut buf);
27484        let mut unstructured = Unstructured::new(&buf);
27485        Self::arbitrary(&mut unstructured).unwrap_or_default()
27486    }
27487}
27488impl Default for SERIAL_CONTROL_DATA {
27489    fn default() -> Self {
27490        Self::DEFAULT.clone()
27491    }
27492}
27493impl MessageData for SERIAL_CONTROL_DATA {
27494    type Message = MavMessage;
27495    const ID: u32 = 126u32;
27496    const NAME: &'static str = "SERIAL_CONTROL";
27497    const EXTRA_CRC: u8 = 220u8;
27498    const ENCODED_LEN: usize = 81usize;
27499    fn deser(
27500        _version: MavlinkVersion,
27501        __input: &[u8],
27502    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27503        let avail_len = __input.len();
27504        let mut payload_buf = [0; Self::ENCODED_LEN];
27505        let mut buf = if avail_len < Self::ENCODED_LEN {
27506            payload_buf[0..avail_len].copy_from_slice(__input);
27507            Bytes::new(&payload_buf)
27508        } else {
27509            Bytes::new(__input)
27510        };
27511        let mut __struct = Self::default();
27512        __struct.baudrate = buf.get_u32_le();
27513        __struct.timeout = buf.get_u16_le();
27514        let tmp = buf.get_u8();
27515        __struct.device =
27516            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27517                enum_type: "SerialControlDev",
27518                value: tmp as u32,
27519            })?;
27520        let tmp = buf.get_u8();
27521        __struct.flags = SerialControlFlag::from_bits(tmp & SerialControlFlag::all().bits())
27522            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27523                flag_type: "SerialControlFlag",
27524                value: tmp as u32,
27525            })?;
27526        __struct.count = buf.get_u8();
27527        for v in &mut __struct.data {
27528            let val = buf.get_u8();
27529            *v = val;
27530        }
27531        __struct.target_system = buf.get_u8();
27532        __struct.target_component = buf.get_u8();
27533        Ok(__struct)
27534    }
27535    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27536        let mut __tmp = BytesMut::new(bytes);
27537        #[allow(clippy::absurd_extreme_comparisons)]
27538        #[allow(unused_comparisons)]
27539        if __tmp.remaining() < Self::ENCODED_LEN {
27540            panic!(
27541                "buffer is too small (need {} bytes, but got {})",
27542                Self::ENCODED_LEN,
27543                __tmp.remaining(),
27544            )
27545        }
27546        __tmp.put_u32_le(self.baudrate);
27547        __tmp.put_u16_le(self.timeout);
27548        __tmp.put_u8(self.device as u8);
27549        __tmp.put_u8(self.flags.bits());
27550        __tmp.put_u8(self.count);
27551        for val in &self.data {
27552            __tmp.put_u8(*val);
27553        }
27554        if matches!(version, MavlinkVersion::V2) {
27555            __tmp.put_u8(self.target_system);
27556            __tmp.put_u8(self.target_component);
27557            let len = __tmp.len();
27558            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27559        } else {
27560            __tmp.len()
27561        }
27562    }
27563}
27564#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
27565#[doc = ""]
27566#[doc = "ID: 36"]
27567#[derive(Debug, Clone, PartialEq)]
27568#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27569#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27570#[cfg_attr(feature = "ts", derive(TS))]
27571#[cfg_attr(feature = "ts", ts(export))]
27572pub struct SERVO_OUTPUT_RAW_DATA {
27573    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27574    pub time_usec: u32,
27575    #[doc = "Servo output 1 value"]
27576    pub servo1_raw: u16,
27577    #[doc = "Servo output 2 value"]
27578    pub servo2_raw: u16,
27579    #[doc = "Servo output 3 value"]
27580    pub servo3_raw: u16,
27581    #[doc = "Servo output 4 value"]
27582    pub servo4_raw: u16,
27583    #[doc = "Servo output 5 value"]
27584    pub servo5_raw: u16,
27585    #[doc = "Servo output 6 value"]
27586    pub servo6_raw: u16,
27587    #[doc = "Servo output 7 value"]
27588    pub servo7_raw: u16,
27589    #[doc = "Servo output 8 value"]
27590    pub servo8_raw: u16,
27591    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
27592    pub port: u8,
27593    #[doc = "Servo output 9 value"]
27594    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27595    pub servo9_raw: u16,
27596    #[doc = "Servo output 10 value"]
27597    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27598    pub servo10_raw: u16,
27599    #[doc = "Servo output 11 value"]
27600    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27601    pub servo11_raw: u16,
27602    #[doc = "Servo output 12 value"]
27603    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27604    pub servo12_raw: u16,
27605    #[doc = "Servo output 13 value"]
27606    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27607    pub servo13_raw: u16,
27608    #[doc = "Servo output 14 value"]
27609    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27610    pub servo14_raw: u16,
27611    #[doc = "Servo output 15 value"]
27612    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27613    pub servo15_raw: u16,
27614    #[doc = "Servo output 16 value"]
27615    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27616    pub servo16_raw: u16,
27617}
27618impl SERVO_OUTPUT_RAW_DATA {
27619    pub const ENCODED_LEN: usize = 37usize;
27620    pub const DEFAULT: Self = Self {
27621        time_usec: 0_u32,
27622        servo1_raw: 0_u16,
27623        servo2_raw: 0_u16,
27624        servo3_raw: 0_u16,
27625        servo4_raw: 0_u16,
27626        servo5_raw: 0_u16,
27627        servo6_raw: 0_u16,
27628        servo7_raw: 0_u16,
27629        servo8_raw: 0_u16,
27630        port: 0_u8,
27631        servo9_raw: 0_u16,
27632        servo10_raw: 0_u16,
27633        servo11_raw: 0_u16,
27634        servo12_raw: 0_u16,
27635        servo13_raw: 0_u16,
27636        servo14_raw: 0_u16,
27637        servo15_raw: 0_u16,
27638        servo16_raw: 0_u16,
27639    };
27640    #[cfg(feature = "arbitrary")]
27641    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27642        use arbitrary::{Arbitrary, Unstructured};
27643        let mut buf = [0u8; 1024];
27644        rng.fill_bytes(&mut buf);
27645        let mut unstructured = Unstructured::new(&buf);
27646        Self::arbitrary(&mut unstructured).unwrap_or_default()
27647    }
27648}
27649impl Default for SERVO_OUTPUT_RAW_DATA {
27650    fn default() -> Self {
27651        Self::DEFAULT.clone()
27652    }
27653}
27654impl MessageData for SERVO_OUTPUT_RAW_DATA {
27655    type Message = MavMessage;
27656    const ID: u32 = 36u32;
27657    const NAME: &'static str = "SERVO_OUTPUT_RAW";
27658    const EXTRA_CRC: u8 = 222u8;
27659    const ENCODED_LEN: usize = 37usize;
27660    fn deser(
27661        _version: MavlinkVersion,
27662        __input: &[u8],
27663    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27664        let avail_len = __input.len();
27665        let mut payload_buf = [0; Self::ENCODED_LEN];
27666        let mut buf = if avail_len < Self::ENCODED_LEN {
27667            payload_buf[0..avail_len].copy_from_slice(__input);
27668            Bytes::new(&payload_buf)
27669        } else {
27670            Bytes::new(__input)
27671        };
27672        let mut __struct = Self::default();
27673        __struct.time_usec = buf.get_u32_le();
27674        __struct.servo1_raw = buf.get_u16_le();
27675        __struct.servo2_raw = buf.get_u16_le();
27676        __struct.servo3_raw = buf.get_u16_le();
27677        __struct.servo4_raw = buf.get_u16_le();
27678        __struct.servo5_raw = buf.get_u16_le();
27679        __struct.servo6_raw = buf.get_u16_le();
27680        __struct.servo7_raw = buf.get_u16_le();
27681        __struct.servo8_raw = buf.get_u16_le();
27682        __struct.port = buf.get_u8();
27683        __struct.servo9_raw = buf.get_u16_le();
27684        __struct.servo10_raw = buf.get_u16_le();
27685        __struct.servo11_raw = buf.get_u16_le();
27686        __struct.servo12_raw = buf.get_u16_le();
27687        __struct.servo13_raw = buf.get_u16_le();
27688        __struct.servo14_raw = buf.get_u16_le();
27689        __struct.servo15_raw = buf.get_u16_le();
27690        __struct.servo16_raw = buf.get_u16_le();
27691        Ok(__struct)
27692    }
27693    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27694        let mut __tmp = BytesMut::new(bytes);
27695        #[allow(clippy::absurd_extreme_comparisons)]
27696        #[allow(unused_comparisons)]
27697        if __tmp.remaining() < Self::ENCODED_LEN {
27698            panic!(
27699                "buffer is too small (need {} bytes, but got {})",
27700                Self::ENCODED_LEN,
27701                __tmp.remaining(),
27702            )
27703        }
27704        __tmp.put_u32_le(self.time_usec);
27705        __tmp.put_u16_le(self.servo1_raw);
27706        __tmp.put_u16_le(self.servo2_raw);
27707        __tmp.put_u16_le(self.servo3_raw);
27708        __tmp.put_u16_le(self.servo4_raw);
27709        __tmp.put_u16_le(self.servo5_raw);
27710        __tmp.put_u16_le(self.servo6_raw);
27711        __tmp.put_u16_le(self.servo7_raw);
27712        __tmp.put_u16_le(self.servo8_raw);
27713        __tmp.put_u8(self.port);
27714        if matches!(version, MavlinkVersion::V2) {
27715            __tmp.put_u16_le(self.servo9_raw);
27716            __tmp.put_u16_le(self.servo10_raw);
27717            __tmp.put_u16_le(self.servo11_raw);
27718            __tmp.put_u16_le(self.servo12_raw);
27719            __tmp.put_u16_le(self.servo13_raw);
27720            __tmp.put_u16_le(self.servo14_raw);
27721            __tmp.put_u16_le(self.servo15_raw);
27722            __tmp.put_u16_le(self.servo16_raw);
27723            let len = __tmp.len();
27724            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27725        } else {
27726            __tmp.len()
27727        }
27728    }
27729}
27730#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
27731#[doc = ""]
27732#[doc = "ID: 256"]
27733#[derive(Debug, Clone, PartialEq)]
27734#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27735#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27736#[cfg_attr(feature = "ts", derive(TS))]
27737#[cfg_attr(feature = "ts", ts(export))]
27738pub struct SETUP_SIGNING_DATA {
27739    #[doc = "initial timestamp"]
27740    pub initial_timestamp: u64,
27741    #[doc = "system id of the target"]
27742    pub target_system: u8,
27743    #[doc = "component ID of the target"]
27744    pub target_component: u8,
27745    #[doc = "signing key"]
27746    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27747    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27748    pub secret_key: [u8; 32],
27749}
27750impl SETUP_SIGNING_DATA {
27751    pub const ENCODED_LEN: usize = 42usize;
27752    pub const DEFAULT: Self = Self {
27753        initial_timestamp: 0_u64,
27754        target_system: 0_u8,
27755        target_component: 0_u8,
27756        secret_key: [0_u8; 32usize],
27757    };
27758    #[cfg(feature = "arbitrary")]
27759    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27760        use arbitrary::{Arbitrary, Unstructured};
27761        let mut buf = [0u8; 1024];
27762        rng.fill_bytes(&mut buf);
27763        let mut unstructured = Unstructured::new(&buf);
27764        Self::arbitrary(&mut unstructured).unwrap_or_default()
27765    }
27766}
27767impl Default for SETUP_SIGNING_DATA {
27768    fn default() -> Self {
27769        Self::DEFAULT.clone()
27770    }
27771}
27772impl MessageData for SETUP_SIGNING_DATA {
27773    type Message = MavMessage;
27774    const ID: u32 = 256u32;
27775    const NAME: &'static str = "SETUP_SIGNING";
27776    const EXTRA_CRC: u8 = 71u8;
27777    const ENCODED_LEN: usize = 42usize;
27778    fn deser(
27779        _version: MavlinkVersion,
27780        __input: &[u8],
27781    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27782        let avail_len = __input.len();
27783        let mut payload_buf = [0; Self::ENCODED_LEN];
27784        let mut buf = if avail_len < Self::ENCODED_LEN {
27785            payload_buf[0..avail_len].copy_from_slice(__input);
27786            Bytes::new(&payload_buf)
27787        } else {
27788            Bytes::new(__input)
27789        };
27790        let mut __struct = Self::default();
27791        __struct.initial_timestamp = buf.get_u64_le();
27792        __struct.target_system = buf.get_u8();
27793        __struct.target_component = buf.get_u8();
27794        for v in &mut __struct.secret_key {
27795            let val = buf.get_u8();
27796            *v = val;
27797        }
27798        Ok(__struct)
27799    }
27800    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27801        let mut __tmp = BytesMut::new(bytes);
27802        #[allow(clippy::absurd_extreme_comparisons)]
27803        #[allow(unused_comparisons)]
27804        if __tmp.remaining() < Self::ENCODED_LEN {
27805            panic!(
27806                "buffer is too small (need {} bytes, but got {})",
27807                Self::ENCODED_LEN,
27808                __tmp.remaining(),
27809            )
27810        }
27811        __tmp.put_u64_le(self.initial_timestamp);
27812        __tmp.put_u8(self.target_system);
27813        __tmp.put_u8(self.target_component);
27814        for val in &self.secret_key {
27815            __tmp.put_u8(*val);
27816        }
27817        if matches!(version, MavlinkVersion::V2) {
27818            let len = __tmp.len();
27819            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27820        } else {
27821            __tmp.len()
27822        }
27823    }
27824}
27825#[doc = "Set the vehicle attitude and body angular rates."]
27826#[doc = ""]
27827#[doc = "ID: 139"]
27828#[derive(Debug, Clone, PartialEq)]
27829#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27830#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27831#[cfg_attr(feature = "ts", derive(TS))]
27832#[cfg_attr(feature = "ts", ts(export))]
27833pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
27834    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27835    pub time_usec: u64,
27836    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
27837    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27838    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27839    pub controls: [f32; 8],
27840    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
27841    pub group_mlx: u8,
27842    #[doc = "System ID"]
27843    pub target_system: u8,
27844    #[doc = "Component ID"]
27845    pub target_component: u8,
27846}
27847impl SET_ACTUATOR_CONTROL_TARGET_DATA {
27848    pub const ENCODED_LEN: usize = 43usize;
27849    pub const DEFAULT: Self = Self {
27850        time_usec: 0_u64,
27851        controls: [0.0_f32; 8usize],
27852        group_mlx: 0_u8,
27853        target_system: 0_u8,
27854        target_component: 0_u8,
27855    };
27856    #[cfg(feature = "arbitrary")]
27857    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27858        use arbitrary::{Arbitrary, Unstructured};
27859        let mut buf = [0u8; 1024];
27860        rng.fill_bytes(&mut buf);
27861        let mut unstructured = Unstructured::new(&buf);
27862        Self::arbitrary(&mut unstructured).unwrap_or_default()
27863    }
27864}
27865impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
27866    fn default() -> Self {
27867        Self::DEFAULT.clone()
27868    }
27869}
27870impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
27871    type Message = MavMessage;
27872    const ID: u32 = 139u32;
27873    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
27874    const EXTRA_CRC: u8 = 168u8;
27875    const ENCODED_LEN: usize = 43usize;
27876    fn deser(
27877        _version: MavlinkVersion,
27878        __input: &[u8],
27879    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27880        let avail_len = __input.len();
27881        let mut payload_buf = [0; Self::ENCODED_LEN];
27882        let mut buf = if avail_len < Self::ENCODED_LEN {
27883            payload_buf[0..avail_len].copy_from_slice(__input);
27884            Bytes::new(&payload_buf)
27885        } else {
27886            Bytes::new(__input)
27887        };
27888        let mut __struct = Self::default();
27889        __struct.time_usec = buf.get_u64_le();
27890        for v in &mut __struct.controls {
27891            let val = buf.get_f32_le();
27892            *v = val;
27893        }
27894        __struct.group_mlx = buf.get_u8();
27895        __struct.target_system = buf.get_u8();
27896        __struct.target_component = buf.get_u8();
27897        Ok(__struct)
27898    }
27899    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27900        let mut __tmp = BytesMut::new(bytes);
27901        #[allow(clippy::absurd_extreme_comparisons)]
27902        #[allow(unused_comparisons)]
27903        if __tmp.remaining() < Self::ENCODED_LEN {
27904            panic!(
27905                "buffer is too small (need {} bytes, but got {})",
27906                Self::ENCODED_LEN,
27907                __tmp.remaining(),
27908            )
27909        }
27910        __tmp.put_u64_le(self.time_usec);
27911        for val in &self.controls {
27912            __tmp.put_f32_le(*val);
27913        }
27914        __tmp.put_u8(self.group_mlx);
27915        __tmp.put_u8(self.target_system);
27916        __tmp.put_u8(self.target_component);
27917        if matches!(version, MavlinkVersion::V2) {
27918            let len = __tmp.len();
27919            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27920        } else {
27921            __tmp.len()
27922        }
27923    }
27924}
27925#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
27926#[doc = ""]
27927#[doc = "ID: 82"]
27928#[derive(Debug, Clone, PartialEq)]
27929#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27930#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27931#[cfg_attr(feature = "ts", derive(TS))]
27932#[cfg_attr(feature = "ts", ts(export))]
27933pub struct SET_ATTITUDE_TARGET_DATA {
27934    #[doc = "Timestamp (time since system boot)."]
27935    pub time_boot_ms: u32,
27936    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
27937    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27938    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27939    pub q: [f32; 4],
27940    #[doc = "Body roll rate"]
27941    pub body_roll_rate: f32,
27942    #[doc = "Body pitch rate"]
27943    pub body_pitch_rate: f32,
27944    #[doc = "Body yaw rate"]
27945    pub body_yaw_rate: f32,
27946    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
27947    pub thrust: f32,
27948    #[doc = "System ID"]
27949    pub target_system: u8,
27950    #[doc = "Component ID"]
27951    pub target_component: u8,
27952    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
27953    pub type_mask: AttitudeTargetTypemask,
27954    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
27955    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27956    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27957    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27958    pub thrust_body: [f32; 3],
27959}
27960impl SET_ATTITUDE_TARGET_DATA {
27961    pub const ENCODED_LEN: usize = 51usize;
27962    pub const DEFAULT: Self = Self {
27963        time_boot_ms: 0_u32,
27964        q: [0.0_f32; 4usize],
27965        body_roll_rate: 0.0_f32,
27966        body_pitch_rate: 0.0_f32,
27967        body_yaw_rate: 0.0_f32,
27968        thrust: 0.0_f32,
27969        target_system: 0_u8,
27970        target_component: 0_u8,
27971        type_mask: AttitudeTargetTypemask::DEFAULT,
27972        thrust_body: [0.0_f32; 3usize],
27973    };
27974    #[cfg(feature = "arbitrary")]
27975    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27976        use arbitrary::{Arbitrary, Unstructured};
27977        let mut buf = [0u8; 1024];
27978        rng.fill_bytes(&mut buf);
27979        let mut unstructured = Unstructured::new(&buf);
27980        Self::arbitrary(&mut unstructured).unwrap_or_default()
27981    }
27982}
27983impl Default for SET_ATTITUDE_TARGET_DATA {
27984    fn default() -> Self {
27985        Self::DEFAULT.clone()
27986    }
27987}
27988impl MessageData for SET_ATTITUDE_TARGET_DATA {
27989    type Message = MavMessage;
27990    const ID: u32 = 82u32;
27991    const NAME: &'static str = "SET_ATTITUDE_TARGET";
27992    const EXTRA_CRC: u8 = 49u8;
27993    const ENCODED_LEN: usize = 51usize;
27994    fn deser(
27995        _version: MavlinkVersion,
27996        __input: &[u8],
27997    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27998        let avail_len = __input.len();
27999        let mut payload_buf = [0; Self::ENCODED_LEN];
28000        let mut buf = if avail_len < Self::ENCODED_LEN {
28001            payload_buf[0..avail_len].copy_from_slice(__input);
28002            Bytes::new(&payload_buf)
28003        } else {
28004            Bytes::new(__input)
28005        };
28006        let mut __struct = Self::default();
28007        __struct.time_boot_ms = buf.get_u32_le();
28008        for v in &mut __struct.q {
28009            let val = buf.get_f32_le();
28010            *v = val;
28011        }
28012        __struct.body_roll_rate = buf.get_f32_le();
28013        __struct.body_pitch_rate = buf.get_f32_le();
28014        __struct.body_yaw_rate = buf.get_f32_le();
28015        __struct.thrust = buf.get_f32_le();
28016        __struct.target_system = buf.get_u8();
28017        __struct.target_component = buf.get_u8();
28018        let tmp = buf.get_u8();
28019        __struct.type_mask = AttitudeTargetTypemask::from_bits(
28020            tmp & AttitudeTargetTypemask::all().bits(),
28021        )
28022        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28023            flag_type: "AttitudeTargetTypemask",
28024            value: tmp as u32,
28025        })?;
28026        for v in &mut __struct.thrust_body {
28027            let val = buf.get_f32_le();
28028            *v = val;
28029        }
28030        Ok(__struct)
28031    }
28032    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28033        let mut __tmp = BytesMut::new(bytes);
28034        #[allow(clippy::absurd_extreme_comparisons)]
28035        #[allow(unused_comparisons)]
28036        if __tmp.remaining() < Self::ENCODED_LEN {
28037            panic!(
28038                "buffer is too small (need {} bytes, but got {})",
28039                Self::ENCODED_LEN,
28040                __tmp.remaining(),
28041            )
28042        }
28043        __tmp.put_u32_le(self.time_boot_ms);
28044        for val in &self.q {
28045            __tmp.put_f32_le(*val);
28046        }
28047        __tmp.put_f32_le(self.body_roll_rate);
28048        __tmp.put_f32_le(self.body_pitch_rate);
28049        __tmp.put_f32_le(self.body_yaw_rate);
28050        __tmp.put_f32_le(self.thrust);
28051        __tmp.put_u8(self.target_system);
28052        __tmp.put_u8(self.target_component);
28053        __tmp.put_u8(self.type_mask.bits());
28054        if matches!(version, MavlinkVersion::V2) {
28055            for val in &self.thrust_body {
28056                __tmp.put_f32_le(*val);
28057            }
28058            let len = __tmp.len();
28059            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28060        } else {
28061            __tmp.len()
28062        }
28063    }
28064}
28065#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
28066#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
28067#[doc = ""]
28068#[doc = "ID: 48"]
28069#[derive(Debug, Clone, PartialEq)]
28070#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28071#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28072#[cfg_attr(feature = "ts", derive(TS))]
28073#[cfg_attr(feature = "ts", ts(export))]
28074pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
28075    #[doc = "Latitude (WGS84)"]
28076    pub latitude: i32,
28077    #[doc = "Longitude (WGS84)"]
28078    pub longitude: i32,
28079    #[doc = "Altitude (MSL). Positive for up."]
28080    pub altitude: i32,
28081    #[doc = "System ID"]
28082    pub target_system: u8,
28083    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28084    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28085    pub time_usec: u64,
28086}
28087impl SET_GPS_GLOBAL_ORIGIN_DATA {
28088    pub const ENCODED_LEN: usize = 21usize;
28089    pub const DEFAULT: Self = Self {
28090        latitude: 0_i32,
28091        longitude: 0_i32,
28092        altitude: 0_i32,
28093        target_system: 0_u8,
28094        time_usec: 0_u64,
28095    };
28096    #[cfg(feature = "arbitrary")]
28097    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28098        use arbitrary::{Arbitrary, Unstructured};
28099        let mut buf = [0u8; 1024];
28100        rng.fill_bytes(&mut buf);
28101        let mut unstructured = Unstructured::new(&buf);
28102        Self::arbitrary(&mut unstructured).unwrap_or_default()
28103    }
28104}
28105impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
28106    fn default() -> Self {
28107        Self::DEFAULT.clone()
28108    }
28109}
28110impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
28111    type Message = MavMessage;
28112    const ID: u32 = 48u32;
28113    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
28114    const EXTRA_CRC: u8 = 41u8;
28115    const ENCODED_LEN: usize = 21usize;
28116    fn deser(
28117        _version: MavlinkVersion,
28118        __input: &[u8],
28119    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28120        let avail_len = __input.len();
28121        let mut payload_buf = [0; Self::ENCODED_LEN];
28122        let mut buf = if avail_len < Self::ENCODED_LEN {
28123            payload_buf[0..avail_len].copy_from_slice(__input);
28124            Bytes::new(&payload_buf)
28125        } else {
28126            Bytes::new(__input)
28127        };
28128        let mut __struct = Self::default();
28129        __struct.latitude = buf.get_i32_le();
28130        __struct.longitude = buf.get_i32_le();
28131        __struct.altitude = buf.get_i32_le();
28132        __struct.target_system = buf.get_u8();
28133        __struct.time_usec = buf.get_u64_le();
28134        Ok(__struct)
28135    }
28136    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28137        let mut __tmp = BytesMut::new(bytes);
28138        #[allow(clippy::absurd_extreme_comparisons)]
28139        #[allow(unused_comparisons)]
28140        if __tmp.remaining() < Self::ENCODED_LEN {
28141            panic!(
28142                "buffer is too small (need {} bytes, but got {})",
28143                Self::ENCODED_LEN,
28144                __tmp.remaining(),
28145            )
28146        }
28147        __tmp.put_i32_le(self.latitude);
28148        __tmp.put_i32_le(self.longitude);
28149        __tmp.put_i32_le(self.altitude);
28150        __tmp.put_u8(self.target_system);
28151        if matches!(version, MavlinkVersion::V2) {
28152            __tmp.put_u64_le(self.time_usec);
28153            let len = __tmp.len();
28154            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28155        } else {
28156            __tmp.len()
28157        }
28158    }
28159}
28160#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
28161#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
28162#[doc = ""]
28163#[doc = "ID: 243"]
28164#[derive(Debug, Clone, PartialEq)]
28165#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28166#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28167#[cfg_attr(feature = "ts", derive(TS))]
28168#[cfg_attr(feature = "ts", ts(export))]
28169pub struct SET_HOME_POSITION_DATA {
28170    #[doc = "Latitude (WGS84)"]
28171    pub latitude: i32,
28172    #[doc = "Longitude (WGS84)"]
28173    pub longitude: i32,
28174    #[doc = "Altitude (MSL). Positive for up."]
28175    pub altitude: i32,
28176    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
28177    pub x: f32,
28178    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
28179    pub y: f32,
28180    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
28181    pub z: f32,
28182    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
28183    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28184    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28185    pub q: [f32; 4],
28186    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28187    pub approach_x: f32,
28188    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28189    pub approach_y: f32,
28190    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28191    pub approach_z: f32,
28192    #[doc = "System ID."]
28193    pub target_system: u8,
28194    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28195    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28196    pub time_usec: u64,
28197}
28198impl SET_HOME_POSITION_DATA {
28199    pub const ENCODED_LEN: usize = 61usize;
28200    pub const DEFAULT: Self = Self {
28201        latitude: 0_i32,
28202        longitude: 0_i32,
28203        altitude: 0_i32,
28204        x: 0.0_f32,
28205        y: 0.0_f32,
28206        z: 0.0_f32,
28207        q: [0.0_f32; 4usize],
28208        approach_x: 0.0_f32,
28209        approach_y: 0.0_f32,
28210        approach_z: 0.0_f32,
28211        target_system: 0_u8,
28212        time_usec: 0_u64,
28213    };
28214    #[cfg(feature = "arbitrary")]
28215    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28216        use arbitrary::{Arbitrary, Unstructured};
28217        let mut buf = [0u8; 1024];
28218        rng.fill_bytes(&mut buf);
28219        let mut unstructured = Unstructured::new(&buf);
28220        Self::arbitrary(&mut unstructured).unwrap_or_default()
28221    }
28222}
28223impl Default for SET_HOME_POSITION_DATA {
28224    fn default() -> Self {
28225        Self::DEFAULT.clone()
28226    }
28227}
28228impl MessageData for SET_HOME_POSITION_DATA {
28229    type Message = MavMessage;
28230    const ID: u32 = 243u32;
28231    const NAME: &'static str = "SET_HOME_POSITION";
28232    const EXTRA_CRC: u8 = 85u8;
28233    const ENCODED_LEN: usize = 61usize;
28234    fn deser(
28235        _version: MavlinkVersion,
28236        __input: &[u8],
28237    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28238        let avail_len = __input.len();
28239        let mut payload_buf = [0; Self::ENCODED_LEN];
28240        let mut buf = if avail_len < Self::ENCODED_LEN {
28241            payload_buf[0..avail_len].copy_from_slice(__input);
28242            Bytes::new(&payload_buf)
28243        } else {
28244            Bytes::new(__input)
28245        };
28246        let mut __struct = Self::default();
28247        __struct.latitude = buf.get_i32_le();
28248        __struct.longitude = buf.get_i32_le();
28249        __struct.altitude = buf.get_i32_le();
28250        __struct.x = buf.get_f32_le();
28251        __struct.y = buf.get_f32_le();
28252        __struct.z = buf.get_f32_le();
28253        for v in &mut __struct.q {
28254            let val = buf.get_f32_le();
28255            *v = val;
28256        }
28257        __struct.approach_x = buf.get_f32_le();
28258        __struct.approach_y = buf.get_f32_le();
28259        __struct.approach_z = buf.get_f32_le();
28260        __struct.target_system = buf.get_u8();
28261        __struct.time_usec = buf.get_u64_le();
28262        Ok(__struct)
28263    }
28264    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28265        let mut __tmp = BytesMut::new(bytes);
28266        #[allow(clippy::absurd_extreme_comparisons)]
28267        #[allow(unused_comparisons)]
28268        if __tmp.remaining() < Self::ENCODED_LEN {
28269            panic!(
28270                "buffer is too small (need {} bytes, but got {})",
28271                Self::ENCODED_LEN,
28272                __tmp.remaining(),
28273            )
28274        }
28275        __tmp.put_i32_le(self.latitude);
28276        __tmp.put_i32_le(self.longitude);
28277        __tmp.put_i32_le(self.altitude);
28278        __tmp.put_f32_le(self.x);
28279        __tmp.put_f32_le(self.y);
28280        __tmp.put_f32_le(self.z);
28281        for val in &self.q {
28282            __tmp.put_f32_le(*val);
28283        }
28284        __tmp.put_f32_le(self.approach_x);
28285        __tmp.put_f32_le(self.approach_y);
28286        __tmp.put_f32_le(self.approach_z);
28287        __tmp.put_u8(self.target_system);
28288        if matches!(version, MavlinkVersion::V2) {
28289            __tmp.put_u64_le(self.time_usec);
28290            let len = __tmp.len();
28291            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28292        } else {
28293            __tmp.len()
28294        }
28295    }
28296}
28297#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
28298#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
28299#[doc = ""]
28300#[doc = "ID: 11"]
28301#[derive(Debug, Clone, PartialEq)]
28302#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28303#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28304#[cfg_attr(feature = "ts", derive(TS))]
28305#[cfg_attr(feature = "ts", ts(export))]
28306pub struct SET_MODE_DATA {
28307    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
28308    pub custom_mode: u32,
28309    #[doc = "The system setting the mode"]
28310    pub target_system: u8,
28311    #[doc = "The new base mode."]
28312    pub base_mode: MavMode,
28313}
28314impl SET_MODE_DATA {
28315    pub const ENCODED_LEN: usize = 6usize;
28316    pub const DEFAULT: Self = Self {
28317        custom_mode: 0_u32,
28318        target_system: 0_u8,
28319        base_mode: MavMode::DEFAULT,
28320    };
28321    #[cfg(feature = "arbitrary")]
28322    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28323        use arbitrary::{Arbitrary, Unstructured};
28324        let mut buf = [0u8; 1024];
28325        rng.fill_bytes(&mut buf);
28326        let mut unstructured = Unstructured::new(&buf);
28327        Self::arbitrary(&mut unstructured).unwrap_or_default()
28328    }
28329}
28330impl Default for SET_MODE_DATA {
28331    fn default() -> Self {
28332        Self::DEFAULT.clone()
28333    }
28334}
28335impl MessageData for SET_MODE_DATA {
28336    type Message = MavMessage;
28337    const ID: u32 = 11u32;
28338    const NAME: &'static str = "SET_MODE";
28339    const EXTRA_CRC: u8 = 89u8;
28340    const ENCODED_LEN: usize = 6usize;
28341    fn deser(
28342        _version: MavlinkVersion,
28343        __input: &[u8],
28344    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28345        let avail_len = __input.len();
28346        let mut payload_buf = [0; Self::ENCODED_LEN];
28347        let mut buf = if avail_len < Self::ENCODED_LEN {
28348            payload_buf[0..avail_len].copy_from_slice(__input);
28349            Bytes::new(&payload_buf)
28350        } else {
28351            Bytes::new(__input)
28352        };
28353        let mut __struct = Self::default();
28354        __struct.custom_mode = buf.get_u32_le();
28355        __struct.target_system = buf.get_u8();
28356        let tmp = buf.get_u8();
28357        __struct.base_mode =
28358            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28359                enum_type: "MavMode",
28360                value: tmp as u32,
28361            })?;
28362        Ok(__struct)
28363    }
28364    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28365        let mut __tmp = BytesMut::new(bytes);
28366        #[allow(clippy::absurd_extreme_comparisons)]
28367        #[allow(unused_comparisons)]
28368        if __tmp.remaining() < Self::ENCODED_LEN {
28369            panic!(
28370                "buffer is too small (need {} bytes, but got {})",
28371                Self::ENCODED_LEN,
28372                __tmp.remaining(),
28373            )
28374        }
28375        __tmp.put_u32_le(self.custom_mode);
28376        __tmp.put_u8(self.target_system);
28377        __tmp.put_u8(self.base_mode as u8);
28378        if matches!(version, MavlinkVersion::V2) {
28379            let len = __tmp.len();
28380            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28381        } else {
28382            __tmp.len()
28383        }
28384    }
28385}
28386#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
28387#[doc = ""]
28388#[doc = "ID: 86"]
28389#[derive(Debug, Clone, PartialEq)]
28390#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28391#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28392#[cfg_attr(feature = "ts", derive(TS))]
28393#[cfg_attr(feature = "ts", ts(export))]
28394pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
28395    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
28396    pub time_boot_ms: u32,
28397    #[doc = "Latitude in WGS84 frame"]
28398    pub lat_int: i32,
28399    #[doc = "Longitude in WGS84 frame"]
28400    pub lon_int: i32,
28401    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
28402    pub alt: f32,
28403    #[doc = "X velocity in NED frame"]
28404    pub vx: f32,
28405    #[doc = "Y velocity in NED frame"]
28406    pub vy: f32,
28407    #[doc = "Z velocity in NED frame"]
28408    pub vz: f32,
28409    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28410    pub afx: f32,
28411    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28412    pub afy: f32,
28413    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28414    pub afz: f32,
28415    #[doc = "yaw setpoint"]
28416    pub yaw: f32,
28417    #[doc = "yaw rate setpoint"]
28418    pub yaw_rate: f32,
28419    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28420    pub type_mask: PositionTargetTypemask,
28421    #[doc = "System ID"]
28422    pub target_system: u8,
28423    #[doc = "Component ID"]
28424    pub target_component: u8,
28425    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
28426    pub coordinate_frame: MavFrame,
28427}
28428impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
28429    pub const ENCODED_LEN: usize = 53usize;
28430    pub const DEFAULT: Self = Self {
28431        time_boot_ms: 0_u32,
28432        lat_int: 0_i32,
28433        lon_int: 0_i32,
28434        alt: 0.0_f32,
28435        vx: 0.0_f32,
28436        vy: 0.0_f32,
28437        vz: 0.0_f32,
28438        afx: 0.0_f32,
28439        afy: 0.0_f32,
28440        afz: 0.0_f32,
28441        yaw: 0.0_f32,
28442        yaw_rate: 0.0_f32,
28443        type_mask: PositionTargetTypemask::DEFAULT,
28444        target_system: 0_u8,
28445        target_component: 0_u8,
28446        coordinate_frame: MavFrame::DEFAULT,
28447    };
28448    #[cfg(feature = "arbitrary")]
28449    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28450        use arbitrary::{Arbitrary, Unstructured};
28451        let mut buf = [0u8; 1024];
28452        rng.fill_bytes(&mut buf);
28453        let mut unstructured = Unstructured::new(&buf);
28454        Self::arbitrary(&mut unstructured).unwrap_or_default()
28455    }
28456}
28457impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28458    fn default() -> Self {
28459        Self::DEFAULT.clone()
28460    }
28461}
28462impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28463    type Message = MavMessage;
28464    const ID: u32 = 86u32;
28465    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
28466    const EXTRA_CRC: u8 = 5u8;
28467    const ENCODED_LEN: usize = 53usize;
28468    fn deser(
28469        _version: MavlinkVersion,
28470        __input: &[u8],
28471    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28472        let avail_len = __input.len();
28473        let mut payload_buf = [0; Self::ENCODED_LEN];
28474        let mut buf = if avail_len < Self::ENCODED_LEN {
28475            payload_buf[0..avail_len].copy_from_slice(__input);
28476            Bytes::new(&payload_buf)
28477        } else {
28478            Bytes::new(__input)
28479        };
28480        let mut __struct = Self::default();
28481        __struct.time_boot_ms = buf.get_u32_le();
28482        __struct.lat_int = buf.get_i32_le();
28483        __struct.lon_int = buf.get_i32_le();
28484        __struct.alt = buf.get_f32_le();
28485        __struct.vx = buf.get_f32_le();
28486        __struct.vy = buf.get_f32_le();
28487        __struct.vz = buf.get_f32_le();
28488        __struct.afx = buf.get_f32_le();
28489        __struct.afy = buf.get_f32_le();
28490        __struct.afz = buf.get_f32_le();
28491        __struct.yaw = buf.get_f32_le();
28492        __struct.yaw_rate = buf.get_f32_le();
28493        let tmp = buf.get_u16_le();
28494        __struct.type_mask = PositionTargetTypemask::from_bits(
28495            tmp & PositionTargetTypemask::all().bits(),
28496        )
28497        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28498            flag_type: "PositionTargetTypemask",
28499            value: tmp as u32,
28500        })?;
28501        __struct.target_system = buf.get_u8();
28502        __struct.target_component = buf.get_u8();
28503        let tmp = buf.get_u8();
28504        __struct.coordinate_frame =
28505            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28506                enum_type: "MavFrame",
28507                value: tmp as u32,
28508            })?;
28509        Ok(__struct)
28510    }
28511    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28512        let mut __tmp = BytesMut::new(bytes);
28513        #[allow(clippy::absurd_extreme_comparisons)]
28514        #[allow(unused_comparisons)]
28515        if __tmp.remaining() < Self::ENCODED_LEN {
28516            panic!(
28517                "buffer is too small (need {} bytes, but got {})",
28518                Self::ENCODED_LEN,
28519                __tmp.remaining(),
28520            )
28521        }
28522        __tmp.put_u32_le(self.time_boot_ms);
28523        __tmp.put_i32_le(self.lat_int);
28524        __tmp.put_i32_le(self.lon_int);
28525        __tmp.put_f32_le(self.alt);
28526        __tmp.put_f32_le(self.vx);
28527        __tmp.put_f32_le(self.vy);
28528        __tmp.put_f32_le(self.vz);
28529        __tmp.put_f32_le(self.afx);
28530        __tmp.put_f32_le(self.afy);
28531        __tmp.put_f32_le(self.afz);
28532        __tmp.put_f32_le(self.yaw);
28533        __tmp.put_f32_le(self.yaw_rate);
28534        __tmp.put_u16_le(self.type_mask.bits());
28535        __tmp.put_u8(self.target_system);
28536        __tmp.put_u8(self.target_component);
28537        __tmp.put_u8(self.coordinate_frame as u8);
28538        if matches!(version, MavlinkVersion::V2) {
28539            let len = __tmp.len();
28540            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28541        } else {
28542            __tmp.len()
28543        }
28544    }
28545}
28546#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
28547#[doc = ""]
28548#[doc = "ID: 84"]
28549#[derive(Debug, Clone, PartialEq)]
28550#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28551#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28552#[cfg_attr(feature = "ts", derive(TS))]
28553#[cfg_attr(feature = "ts", ts(export))]
28554pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
28555    #[doc = "Timestamp (time since system boot)."]
28556    pub time_boot_ms: u32,
28557    #[doc = "X Position in NED frame"]
28558    pub x: f32,
28559    #[doc = "Y Position in NED frame"]
28560    pub y: f32,
28561    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
28562    pub z: f32,
28563    #[doc = "X velocity in NED frame"]
28564    pub vx: f32,
28565    #[doc = "Y velocity in NED frame"]
28566    pub vy: f32,
28567    #[doc = "Z velocity in NED frame"]
28568    pub vz: f32,
28569    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28570    pub afx: f32,
28571    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28572    pub afy: f32,
28573    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28574    pub afz: f32,
28575    #[doc = "yaw setpoint"]
28576    pub yaw: f32,
28577    #[doc = "yaw rate setpoint"]
28578    pub yaw_rate: f32,
28579    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28580    pub type_mask: PositionTargetTypemask,
28581    #[doc = "System ID"]
28582    pub target_system: u8,
28583    #[doc = "Component ID"]
28584    pub target_component: u8,
28585    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
28586    pub coordinate_frame: MavFrame,
28587}
28588impl SET_POSITION_TARGET_LOCAL_NED_DATA {
28589    pub const ENCODED_LEN: usize = 53usize;
28590    pub const DEFAULT: Self = Self {
28591        time_boot_ms: 0_u32,
28592        x: 0.0_f32,
28593        y: 0.0_f32,
28594        z: 0.0_f32,
28595        vx: 0.0_f32,
28596        vy: 0.0_f32,
28597        vz: 0.0_f32,
28598        afx: 0.0_f32,
28599        afy: 0.0_f32,
28600        afz: 0.0_f32,
28601        yaw: 0.0_f32,
28602        yaw_rate: 0.0_f32,
28603        type_mask: PositionTargetTypemask::DEFAULT,
28604        target_system: 0_u8,
28605        target_component: 0_u8,
28606        coordinate_frame: MavFrame::DEFAULT,
28607    };
28608    #[cfg(feature = "arbitrary")]
28609    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28610        use arbitrary::{Arbitrary, Unstructured};
28611        let mut buf = [0u8; 1024];
28612        rng.fill_bytes(&mut buf);
28613        let mut unstructured = Unstructured::new(&buf);
28614        Self::arbitrary(&mut unstructured).unwrap_or_default()
28615    }
28616}
28617impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
28618    fn default() -> Self {
28619        Self::DEFAULT.clone()
28620    }
28621}
28622impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
28623    type Message = MavMessage;
28624    const ID: u32 = 84u32;
28625    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
28626    const EXTRA_CRC: u8 = 143u8;
28627    const ENCODED_LEN: usize = 53usize;
28628    fn deser(
28629        _version: MavlinkVersion,
28630        __input: &[u8],
28631    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28632        let avail_len = __input.len();
28633        let mut payload_buf = [0; Self::ENCODED_LEN];
28634        let mut buf = if avail_len < Self::ENCODED_LEN {
28635            payload_buf[0..avail_len].copy_from_slice(__input);
28636            Bytes::new(&payload_buf)
28637        } else {
28638            Bytes::new(__input)
28639        };
28640        let mut __struct = Self::default();
28641        __struct.time_boot_ms = buf.get_u32_le();
28642        __struct.x = buf.get_f32_le();
28643        __struct.y = buf.get_f32_le();
28644        __struct.z = buf.get_f32_le();
28645        __struct.vx = buf.get_f32_le();
28646        __struct.vy = buf.get_f32_le();
28647        __struct.vz = buf.get_f32_le();
28648        __struct.afx = buf.get_f32_le();
28649        __struct.afy = buf.get_f32_le();
28650        __struct.afz = buf.get_f32_le();
28651        __struct.yaw = buf.get_f32_le();
28652        __struct.yaw_rate = buf.get_f32_le();
28653        let tmp = buf.get_u16_le();
28654        __struct.type_mask = PositionTargetTypemask::from_bits(
28655            tmp & PositionTargetTypemask::all().bits(),
28656        )
28657        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28658            flag_type: "PositionTargetTypemask",
28659            value: tmp as u32,
28660        })?;
28661        __struct.target_system = buf.get_u8();
28662        __struct.target_component = buf.get_u8();
28663        let tmp = buf.get_u8();
28664        __struct.coordinate_frame =
28665            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28666                enum_type: "MavFrame",
28667                value: tmp as u32,
28668            })?;
28669        Ok(__struct)
28670    }
28671    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28672        let mut __tmp = BytesMut::new(bytes);
28673        #[allow(clippy::absurd_extreme_comparisons)]
28674        #[allow(unused_comparisons)]
28675        if __tmp.remaining() < Self::ENCODED_LEN {
28676            panic!(
28677                "buffer is too small (need {} bytes, but got {})",
28678                Self::ENCODED_LEN,
28679                __tmp.remaining(),
28680            )
28681        }
28682        __tmp.put_u32_le(self.time_boot_ms);
28683        __tmp.put_f32_le(self.x);
28684        __tmp.put_f32_le(self.y);
28685        __tmp.put_f32_le(self.z);
28686        __tmp.put_f32_le(self.vx);
28687        __tmp.put_f32_le(self.vy);
28688        __tmp.put_f32_le(self.vz);
28689        __tmp.put_f32_le(self.afx);
28690        __tmp.put_f32_le(self.afy);
28691        __tmp.put_f32_le(self.afz);
28692        __tmp.put_f32_le(self.yaw);
28693        __tmp.put_f32_le(self.yaw_rate);
28694        __tmp.put_u16_le(self.type_mask.bits());
28695        __tmp.put_u8(self.target_system);
28696        __tmp.put_u8(self.target_component);
28697        __tmp.put_u8(self.coordinate_frame as u8);
28698        if matches!(version, MavlinkVersion::V2) {
28699            let len = __tmp.len();
28700            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28701        } else {
28702            __tmp.len()
28703        }
28704    }
28705}
28706#[doc = "Status of simulation environment, if used."]
28707#[doc = ""]
28708#[doc = "ID: 108"]
28709#[derive(Debug, Clone, PartialEq)]
28710#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28711#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28712#[cfg_attr(feature = "ts", derive(TS))]
28713#[cfg_attr(feature = "ts", ts(export))]
28714pub struct SIM_STATE_DATA {
28715    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
28716    pub q1: f32,
28717    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
28718    pub q2: f32,
28719    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
28720    pub q3: f32,
28721    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
28722    pub q4: f32,
28723    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
28724    pub roll: f32,
28725    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
28726    pub pitch: f32,
28727    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
28728    pub yaw: f32,
28729    #[doc = "X acceleration"]
28730    pub xacc: f32,
28731    #[doc = "Y acceleration"]
28732    pub yacc: f32,
28733    #[doc = "Z acceleration"]
28734    pub zacc: f32,
28735    #[doc = "Angular speed around X axis"]
28736    pub xgyro: f32,
28737    #[doc = "Angular speed around Y axis"]
28738    pub ygyro: f32,
28739    #[doc = "Angular speed around Z axis"]
28740    pub zgyro: f32,
28741    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
28742    pub lat: f32,
28743    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
28744    pub lon: f32,
28745    #[doc = "Altitude"]
28746    pub alt: f32,
28747    #[doc = "Horizontal position standard deviation"]
28748    pub std_dev_horz: f32,
28749    #[doc = "Vertical position standard deviation"]
28750    pub std_dev_vert: f32,
28751    #[doc = "True velocity in north direction in earth-fixed NED frame"]
28752    pub vn: f32,
28753    #[doc = "True velocity in east direction in earth-fixed NED frame"]
28754    pub ve: f32,
28755    #[doc = "True velocity in down direction in earth-fixed NED frame"]
28756    pub vd: f32,
28757    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
28758    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28759    pub lat_int: i32,
28760    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
28761    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28762    pub lon_int: i32,
28763}
28764impl SIM_STATE_DATA {
28765    pub const ENCODED_LEN: usize = 92usize;
28766    pub const DEFAULT: Self = Self {
28767        q1: 0.0_f32,
28768        q2: 0.0_f32,
28769        q3: 0.0_f32,
28770        q4: 0.0_f32,
28771        roll: 0.0_f32,
28772        pitch: 0.0_f32,
28773        yaw: 0.0_f32,
28774        xacc: 0.0_f32,
28775        yacc: 0.0_f32,
28776        zacc: 0.0_f32,
28777        xgyro: 0.0_f32,
28778        ygyro: 0.0_f32,
28779        zgyro: 0.0_f32,
28780        lat: 0.0_f32,
28781        lon: 0.0_f32,
28782        alt: 0.0_f32,
28783        std_dev_horz: 0.0_f32,
28784        std_dev_vert: 0.0_f32,
28785        vn: 0.0_f32,
28786        ve: 0.0_f32,
28787        vd: 0.0_f32,
28788        lat_int: 0_i32,
28789        lon_int: 0_i32,
28790    };
28791    #[cfg(feature = "arbitrary")]
28792    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28793        use arbitrary::{Arbitrary, Unstructured};
28794        let mut buf = [0u8; 1024];
28795        rng.fill_bytes(&mut buf);
28796        let mut unstructured = Unstructured::new(&buf);
28797        Self::arbitrary(&mut unstructured).unwrap_or_default()
28798    }
28799}
28800impl Default for SIM_STATE_DATA {
28801    fn default() -> Self {
28802        Self::DEFAULT.clone()
28803    }
28804}
28805impl MessageData for SIM_STATE_DATA {
28806    type Message = MavMessage;
28807    const ID: u32 = 108u32;
28808    const NAME: &'static str = "SIM_STATE";
28809    const EXTRA_CRC: u8 = 32u8;
28810    const ENCODED_LEN: usize = 92usize;
28811    fn deser(
28812        _version: MavlinkVersion,
28813        __input: &[u8],
28814    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28815        let avail_len = __input.len();
28816        let mut payload_buf = [0; Self::ENCODED_LEN];
28817        let mut buf = if avail_len < Self::ENCODED_LEN {
28818            payload_buf[0..avail_len].copy_from_slice(__input);
28819            Bytes::new(&payload_buf)
28820        } else {
28821            Bytes::new(__input)
28822        };
28823        let mut __struct = Self::default();
28824        __struct.q1 = buf.get_f32_le();
28825        __struct.q2 = buf.get_f32_le();
28826        __struct.q3 = buf.get_f32_le();
28827        __struct.q4 = buf.get_f32_le();
28828        __struct.roll = buf.get_f32_le();
28829        __struct.pitch = buf.get_f32_le();
28830        __struct.yaw = buf.get_f32_le();
28831        __struct.xacc = buf.get_f32_le();
28832        __struct.yacc = buf.get_f32_le();
28833        __struct.zacc = buf.get_f32_le();
28834        __struct.xgyro = buf.get_f32_le();
28835        __struct.ygyro = buf.get_f32_le();
28836        __struct.zgyro = buf.get_f32_le();
28837        __struct.lat = buf.get_f32_le();
28838        __struct.lon = buf.get_f32_le();
28839        __struct.alt = buf.get_f32_le();
28840        __struct.std_dev_horz = buf.get_f32_le();
28841        __struct.std_dev_vert = buf.get_f32_le();
28842        __struct.vn = buf.get_f32_le();
28843        __struct.ve = buf.get_f32_le();
28844        __struct.vd = buf.get_f32_le();
28845        __struct.lat_int = buf.get_i32_le();
28846        __struct.lon_int = buf.get_i32_le();
28847        Ok(__struct)
28848    }
28849    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28850        let mut __tmp = BytesMut::new(bytes);
28851        #[allow(clippy::absurd_extreme_comparisons)]
28852        #[allow(unused_comparisons)]
28853        if __tmp.remaining() < Self::ENCODED_LEN {
28854            panic!(
28855                "buffer is too small (need {} bytes, but got {})",
28856                Self::ENCODED_LEN,
28857                __tmp.remaining(),
28858            )
28859        }
28860        __tmp.put_f32_le(self.q1);
28861        __tmp.put_f32_le(self.q2);
28862        __tmp.put_f32_le(self.q3);
28863        __tmp.put_f32_le(self.q4);
28864        __tmp.put_f32_le(self.roll);
28865        __tmp.put_f32_le(self.pitch);
28866        __tmp.put_f32_le(self.yaw);
28867        __tmp.put_f32_le(self.xacc);
28868        __tmp.put_f32_le(self.yacc);
28869        __tmp.put_f32_le(self.zacc);
28870        __tmp.put_f32_le(self.xgyro);
28871        __tmp.put_f32_le(self.ygyro);
28872        __tmp.put_f32_le(self.zgyro);
28873        __tmp.put_f32_le(self.lat);
28874        __tmp.put_f32_le(self.lon);
28875        __tmp.put_f32_le(self.alt);
28876        __tmp.put_f32_le(self.std_dev_horz);
28877        __tmp.put_f32_le(self.std_dev_vert);
28878        __tmp.put_f32_le(self.vn);
28879        __tmp.put_f32_le(self.ve);
28880        __tmp.put_f32_le(self.vd);
28881        if matches!(version, MavlinkVersion::V2) {
28882            __tmp.put_i32_le(self.lat_int);
28883            __tmp.put_i32_le(self.lon_int);
28884            let len = __tmp.len();
28885            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28886        } else {
28887            __tmp.len()
28888        }
28889    }
28890}
28891#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
28892#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
28893#[doc = ""]
28894#[doc = "ID: 370"]
28895#[derive(Debug, Clone, PartialEq)]
28896#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28897#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28898#[cfg_attr(feature = "ts", derive(TS))]
28899#[cfg_attr(feature = "ts", ts(export))]
28900pub struct SMART_BATTERY_INFO_DATA {
28901    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
28902    pub capacity_full_specification: i32,
28903    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
28904    pub capacity_full: i32,
28905    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
28906    pub cycle_count: u16,
28907    #[doc = "Battery weight. 0: field not provided."]
28908    pub weight: u16,
28909    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
28910    pub discharge_minimum_voltage: u16,
28911    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
28912    pub charging_minimum_voltage: u16,
28913    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
28914    pub resting_minimum_voltage: u16,
28915    #[doc = "Battery ID"]
28916    pub id: u8,
28917    #[doc = "Function of the battery"]
28918    pub battery_function: MavBatteryFunction,
28919    #[doc = "Type (chemistry) of the battery"]
28920    pub mavtype: MavBatteryType,
28921    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
28922    #[cfg_attr(feature = "ts", ts(type = "string"))]
28923    pub serial_number: CharArray<16>,
28924    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
28925    #[cfg_attr(feature = "ts", ts(type = "string"))]
28926    pub device_name: CharArray<50>,
28927    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
28928    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28929    pub charging_maximum_voltage: u16,
28930    #[doc = "Number of battery cells in series. 0: field not provided."]
28931    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28932    pub cells_in_series: u8,
28933    #[doc = "Maximum pack discharge current. 0: field not provided."]
28934    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28935    pub discharge_maximum_current: u32,
28936    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
28937    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28938    pub discharge_maximum_burst_current: u32,
28939    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
28940    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28941    #[cfg_attr(feature = "ts", ts(type = "string"))]
28942    pub manufacture_date: CharArray<11>,
28943}
28944impl SMART_BATTERY_INFO_DATA {
28945    pub const ENCODED_LEN: usize = 109usize;
28946    pub const DEFAULT: Self = Self {
28947        capacity_full_specification: 0_i32,
28948        capacity_full: 0_i32,
28949        cycle_count: 0_u16,
28950        weight: 0_u16,
28951        discharge_minimum_voltage: 0_u16,
28952        charging_minimum_voltage: 0_u16,
28953        resting_minimum_voltage: 0_u16,
28954        id: 0_u8,
28955        battery_function: MavBatteryFunction::DEFAULT,
28956        mavtype: MavBatteryType::DEFAULT,
28957        serial_number: CharArray::new([0_u8; 16usize]),
28958        device_name: CharArray::new([0_u8; 50usize]),
28959        charging_maximum_voltage: 0_u16,
28960        cells_in_series: 0_u8,
28961        discharge_maximum_current: 0_u32,
28962        discharge_maximum_burst_current: 0_u32,
28963        manufacture_date: CharArray::new([0_u8; 11usize]),
28964    };
28965    #[cfg(feature = "arbitrary")]
28966    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28967        use arbitrary::{Arbitrary, Unstructured};
28968        let mut buf = [0u8; 1024];
28969        rng.fill_bytes(&mut buf);
28970        let mut unstructured = Unstructured::new(&buf);
28971        Self::arbitrary(&mut unstructured).unwrap_or_default()
28972    }
28973}
28974impl Default for SMART_BATTERY_INFO_DATA {
28975    fn default() -> Self {
28976        Self::DEFAULT.clone()
28977    }
28978}
28979impl MessageData for SMART_BATTERY_INFO_DATA {
28980    type Message = MavMessage;
28981    const ID: u32 = 370u32;
28982    const NAME: &'static str = "SMART_BATTERY_INFO";
28983    const EXTRA_CRC: u8 = 75u8;
28984    const ENCODED_LEN: usize = 109usize;
28985    fn deser(
28986        _version: MavlinkVersion,
28987        __input: &[u8],
28988    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28989        let avail_len = __input.len();
28990        let mut payload_buf = [0; Self::ENCODED_LEN];
28991        let mut buf = if avail_len < Self::ENCODED_LEN {
28992            payload_buf[0..avail_len].copy_from_slice(__input);
28993            Bytes::new(&payload_buf)
28994        } else {
28995            Bytes::new(__input)
28996        };
28997        let mut __struct = Self::default();
28998        __struct.capacity_full_specification = buf.get_i32_le();
28999        __struct.capacity_full = buf.get_i32_le();
29000        __struct.cycle_count = buf.get_u16_le();
29001        __struct.weight = buf.get_u16_le();
29002        __struct.discharge_minimum_voltage = buf.get_u16_le();
29003        __struct.charging_minimum_voltage = buf.get_u16_le();
29004        __struct.resting_minimum_voltage = buf.get_u16_le();
29005        __struct.id = buf.get_u8();
29006        let tmp = buf.get_u8();
29007        __struct.battery_function =
29008            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29009                enum_type: "MavBatteryFunction",
29010                value: tmp as u32,
29011            })?;
29012        let tmp = buf.get_u8();
29013        __struct.mavtype =
29014            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29015                enum_type: "MavBatteryType",
29016                value: tmp as u32,
29017            })?;
29018        let mut tmp = [0_u8; 16usize];
29019        for v in &mut tmp {
29020            *v = buf.get_u8();
29021        }
29022        __struct.serial_number = CharArray::new(tmp);
29023        let mut tmp = [0_u8; 50usize];
29024        for v in &mut tmp {
29025            *v = buf.get_u8();
29026        }
29027        __struct.device_name = CharArray::new(tmp);
29028        __struct.charging_maximum_voltage = buf.get_u16_le();
29029        __struct.cells_in_series = buf.get_u8();
29030        __struct.discharge_maximum_current = buf.get_u32_le();
29031        __struct.discharge_maximum_burst_current = buf.get_u32_le();
29032        let mut tmp = [0_u8; 11usize];
29033        for v in &mut tmp {
29034            *v = buf.get_u8();
29035        }
29036        __struct.manufacture_date = CharArray::new(tmp);
29037        Ok(__struct)
29038    }
29039    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29040        let mut __tmp = BytesMut::new(bytes);
29041        #[allow(clippy::absurd_extreme_comparisons)]
29042        #[allow(unused_comparisons)]
29043        if __tmp.remaining() < Self::ENCODED_LEN {
29044            panic!(
29045                "buffer is too small (need {} bytes, but got {})",
29046                Self::ENCODED_LEN,
29047                __tmp.remaining(),
29048            )
29049        }
29050        __tmp.put_i32_le(self.capacity_full_specification);
29051        __tmp.put_i32_le(self.capacity_full);
29052        __tmp.put_u16_le(self.cycle_count);
29053        __tmp.put_u16_le(self.weight);
29054        __tmp.put_u16_le(self.discharge_minimum_voltage);
29055        __tmp.put_u16_le(self.charging_minimum_voltage);
29056        __tmp.put_u16_le(self.resting_minimum_voltage);
29057        __tmp.put_u8(self.id);
29058        __tmp.put_u8(self.battery_function as u8);
29059        __tmp.put_u8(self.mavtype as u8);
29060        for val in &self.serial_number {
29061            __tmp.put_u8(*val);
29062        }
29063        for val in &self.device_name {
29064            __tmp.put_u8(*val);
29065        }
29066        if matches!(version, MavlinkVersion::V2) {
29067            __tmp.put_u16_le(self.charging_maximum_voltage);
29068            __tmp.put_u8(self.cells_in_series);
29069            __tmp.put_u32_le(self.discharge_maximum_current);
29070            __tmp.put_u32_le(self.discharge_maximum_burst_current);
29071            for val in &self.manufacture_date {
29072                __tmp.put_u8(*val);
29073            }
29074            let len = __tmp.len();
29075            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29076        } else {
29077            __tmp.len()
29078        }
29079    }
29080}
29081#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
29082#[doc = ""]
29083#[doc = "ID: 253"]
29084#[derive(Debug, Clone, PartialEq)]
29085#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29087#[cfg_attr(feature = "ts", derive(TS))]
29088#[cfg_attr(feature = "ts", ts(export))]
29089pub struct STATUSTEXT_DATA {
29090    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
29091    pub severity: MavSeverity,
29092    #[doc = "Status text message, without null termination character"]
29093    #[cfg_attr(feature = "ts", ts(type = "string"))]
29094    pub text: CharArray<50>,
29095    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
29096    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29097    pub id: u16,
29098    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
29099    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29100    pub chunk_seq: u8,
29101}
29102impl STATUSTEXT_DATA {
29103    pub const ENCODED_LEN: usize = 54usize;
29104    pub const DEFAULT: Self = Self {
29105        severity: MavSeverity::DEFAULT,
29106        text: CharArray::new([0_u8; 50usize]),
29107        id: 0_u16,
29108        chunk_seq: 0_u8,
29109    };
29110    #[cfg(feature = "arbitrary")]
29111    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29112        use arbitrary::{Arbitrary, Unstructured};
29113        let mut buf = [0u8; 1024];
29114        rng.fill_bytes(&mut buf);
29115        let mut unstructured = Unstructured::new(&buf);
29116        Self::arbitrary(&mut unstructured).unwrap_or_default()
29117    }
29118}
29119impl Default for STATUSTEXT_DATA {
29120    fn default() -> Self {
29121        Self::DEFAULT.clone()
29122    }
29123}
29124impl MessageData for STATUSTEXT_DATA {
29125    type Message = MavMessage;
29126    const ID: u32 = 253u32;
29127    const NAME: &'static str = "STATUSTEXT";
29128    const EXTRA_CRC: u8 = 83u8;
29129    const ENCODED_LEN: usize = 54usize;
29130    fn deser(
29131        _version: MavlinkVersion,
29132        __input: &[u8],
29133    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29134        let avail_len = __input.len();
29135        let mut payload_buf = [0; Self::ENCODED_LEN];
29136        let mut buf = if avail_len < Self::ENCODED_LEN {
29137            payload_buf[0..avail_len].copy_from_slice(__input);
29138            Bytes::new(&payload_buf)
29139        } else {
29140            Bytes::new(__input)
29141        };
29142        let mut __struct = Self::default();
29143        let tmp = buf.get_u8();
29144        __struct.severity =
29145            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29146                enum_type: "MavSeverity",
29147                value: tmp as u32,
29148            })?;
29149        let mut tmp = [0_u8; 50usize];
29150        for v in &mut tmp {
29151            *v = buf.get_u8();
29152        }
29153        __struct.text = CharArray::new(tmp);
29154        __struct.id = buf.get_u16_le();
29155        __struct.chunk_seq = buf.get_u8();
29156        Ok(__struct)
29157    }
29158    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29159        let mut __tmp = BytesMut::new(bytes);
29160        #[allow(clippy::absurd_extreme_comparisons)]
29161        #[allow(unused_comparisons)]
29162        if __tmp.remaining() < Self::ENCODED_LEN {
29163            panic!(
29164                "buffer is too small (need {} bytes, but got {})",
29165                Self::ENCODED_LEN,
29166                __tmp.remaining(),
29167            )
29168        }
29169        __tmp.put_u8(self.severity as u8);
29170        for val in &self.text {
29171            __tmp.put_u8(*val);
29172        }
29173        if matches!(version, MavlinkVersion::V2) {
29174            __tmp.put_u16_le(self.id);
29175            __tmp.put_u8(self.chunk_seq);
29176            let len = __tmp.len();
29177            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29178        } else {
29179            __tmp.len()
29180        }
29181    }
29182}
29183#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
29184#[doc = ""]
29185#[doc = "ID: 261"]
29186#[derive(Debug, Clone, PartialEq)]
29187#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29188#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29189#[cfg_attr(feature = "ts", derive(TS))]
29190#[cfg_attr(feature = "ts", ts(export))]
29191pub struct STORAGE_INFORMATION_DATA {
29192    #[doc = "Timestamp (time since system boot)."]
29193    pub time_boot_ms: u32,
29194    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29195    pub total_capacity: f32,
29196    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29197    pub used_capacity: f32,
29198    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29199    pub available_capacity: f32,
29200    #[doc = "Read speed."]
29201    pub read_speed: f32,
29202    #[doc = "Write speed."]
29203    pub write_speed: f32,
29204    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
29205    pub storage_id: u8,
29206    #[doc = "Number of storage devices"]
29207    pub storage_count: u8,
29208    #[doc = "Status of storage"]
29209    pub status: StorageStatus,
29210    #[doc = "Type of storage"]
29211    #[cfg_attr(feature = "serde", serde(default))]
29212    pub mavtype: StorageType,
29213    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
29214    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29215    #[cfg_attr(feature = "ts", ts(type = "string"))]
29216    pub name: CharArray<32>,
29217    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
29218    #[cfg_attr(feature = "serde", serde(default))]
29219    pub storage_usage: StorageUsageFlag,
29220}
29221impl STORAGE_INFORMATION_DATA {
29222    pub const ENCODED_LEN: usize = 61usize;
29223    pub const DEFAULT: Self = Self {
29224        time_boot_ms: 0_u32,
29225        total_capacity: 0.0_f32,
29226        used_capacity: 0.0_f32,
29227        available_capacity: 0.0_f32,
29228        read_speed: 0.0_f32,
29229        write_speed: 0.0_f32,
29230        storage_id: 0_u8,
29231        storage_count: 0_u8,
29232        status: StorageStatus::DEFAULT,
29233        mavtype: StorageType::DEFAULT,
29234        name: CharArray::new([0_u8; 32usize]),
29235        storage_usage: StorageUsageFlag::DEFAULT,
29236    };
29237    #[cfg(feature = "arbitrary")]
29238    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29239        use arbitrary::{Arbitrary, Unstructured};
29240        let mut buf = [0u8; 1024];
29241        rng.fill_bytes(&mut buf);
29242        let mut unstructured = Unstructured::new(&buf);
29243        Self::arbitrary(&mut unstructured).unwrap_or_default()
29244    }
29245}
29246impl Default for STORAGE_INFORMATION_DATA {
29247    fn default() -> Self {
29248        Self::DEFAULT.clone()
29249    }
29250}
29251impl MessageData for STORAGE_INFORMATION_DATA {
29252    type Message = MavMessage;
29253    const ID: u32 = 261u32;
29254    const NAME: &'static str = "STORAGE_INFORMATION";
29255    const EXTRA_CRC: u8 = 179u8;
29256    const ENCODED_LEN: usize = 61usize;
29257    fn deser(
29258        _version: MavlinkVersion,
29259        __input: &[u8],
29260    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29261        let avail_len = __input.len();
29262        let mut payload_buf = [0; Self::ENCODED_LEN];
29263        let mut buf = if avail_len < Self::ENCODED_LEN {
29264            payload_buf[0..avail_len].copy_from_slice(__input);
29265            Bytes::new(&payload_buf)
29266        } else {
29267            Bytes::new(__input)
29268        };
29269        let mut __struct = Self::default();
29270        __struct.time_boot_ms = buf.get_u32_le();
29271        __struct.total_capacity = buf.get_f32_le();
29272        __struct.used_capacity = buf.get_f32_le();
29273        __struct.available_capacity = buf.get_f32_le();
29274        __struct.read_speed = buf.get_f32_le();
29275        __struct.write_speed = buf.get_f32_le();
29276        __struct.storage_id = buf.get_u8();
29277        __struct.storage_count = buf.get_u8();
29278        let tmp = buf.get_u8();
29279        __struct.status =
29280            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29281                enum_type: "StorageStatus",
29282                value: tmp as u32,
29283            })?;
29284        let tmp = buf.get_u8();
29285        __struct.mavtype =
29286            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29287                enum_type: "StorageType",
29288                value: tmp as u32,
29289            })?;
29290        let mut tmp = [0_u8; 32usize];
29291        for v in &mut tmp {
29292            *v = buf.get_u8();
29293        }
29294        __struct.name = CharArray::new(tmp);
29295        let tmp = buf.get_u8();
29296        __struct.storage_usage = StorageUsageFlag::from_bits(tmp & StorageUsageFlag::all().bits())
29297            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29298                flag_type: "StorageUsageFlag",
29299                value: tmp as u32,
29300            })?;
29301        Ok(__struct)
29302    }
29303    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29304        let mut __tmp = BytesMut::new(bytes);
29305        #[allow(clippy::absurd_extreme_comparisons)]
29306        #[allow(unused_comparisons)]
29307        if __tmp.remaining() < Self::ENCODED_LEN {
29308            panic!(
29309                "buffer is too small (need {} bytes, but got {})",
29310                Self::ENCODED_LEN,
29311                __tmp.remaining(),
29312            )
29313        }
29314        __tmp.put_u32_le(self.time_boot_ms);
29315        __tmp.put_f32_le(self.total_capacity);
29316        __tmp.put_f32_le(self.used_capacity);
29317        __tmp.put_f32_le(self.available_capacity);
29318        __tmp.put_f32_le(self.read_speed);
29319        __tmp.put_f32_le(self.write_speed);
29320        __tmp.put_u8(self.storage_id);
29321        __tmp.put_u8(self.storage_count);
29322        __tmp.put_u8(self.status as u8);
29323        if matches!(version, MavlinkVersion::V2) {
29324            __tmp.put_u8(self.mavtype as u8);
29325            for val in &self.name {
29326                __tmp.put_u8(*val);
29327            }
29328            __tmp.put_u8(self.storage_usage.bits());
29329            let len = __tmp.len();
29330            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29331        } else {
29332            __tmp.len()
29333        }
29334    }
29335}
29336#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
29337#[doc = ""]
29338#[doc = "ID: 401"]
29339#[derive(Debug, Clone, PartialEq)]
29340#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29342#[cfg_attr(feature = "ts", derive(TS))]
29343#[cfg_attr(feature = "ts", ts(export))]
29344pub struct SUPPORTED_TUNES_DATA {
29345    #[doc = "Bitfield of supported tune formats."]
29346    pub format: TuneFormat,
29347    #[doc = "System ID"]
29348    pub target_system: u8,
29349    #[doc = "Component ID"]
29350    pub target_component: u8,
29351}
29352impl SUPPORTED_TUNES_DATA {
29353    pub const ENCODED_LEN: usize = 6usize;
29354    pub const DEFAULT: Self = Self {
29355        format: TuneFormat::DEFAULT,
29356        target_system: 0_u8,
29357        target_component: 0_u8,
29358    };
29359    #[cfg(feature = "arbitrary")]
29360    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29361        use arbitrary::{Arbitrary, Unstructured};
29362        let mut buf = [0u8; 1024];
29363        rng.fill_bytes(&mut buf);
29364        let mut unstructured = Unstructured::new(&buf);
29365        Self::arbitrary(&mut unstructured).unwrap_or_default()
29366    }
29367}
29368impl Default for SUPPORTED_TUNES_DATA {
29369    fn default() -> Self {
29370        Self::DEFAULT.clone()
29371    }
29372}
29373impl MessageData for SUPPORTED_TUNES_DATA {
29374    type Message = MavMessage;
29375    const ID: u32 = 401u32;
29376    const NAME: &'static str = "SUPPORTED_TUNES";
29377    const EXTRA_CRC: u8 = 183u8;
29378    const ENCODED_LEN: usize = 6usize;
29379    fn deser(
29380        _version: MavlinkVersion,
29381        __input: &[u8],
29382    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29383        let avail_len = __input.len();
29384        let mut payload_buf = [0; Self::ENCODED_LEN];
29385        let mut buf = if avail_len < Self::ENCODED_LEN {
29386            payload_buf[0..avail_len].copy_from_slice(__input);
29387            Bytes::new(&payload_buf)
29388        } else {
29389            Bytes::new(__input)
29390        };
29391        let mut __struct = Self::default();
29392        let tmp = buf.get_u32_le();
29393        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
29394            ::mavlink_core::error::ParserError::InvalidEnum {
29395                enum_type: "TuneFormat",
29396                value: tmp as u32,
29397            },
29398        )?;
29399        __struct.target_system = buf.get_u8();
29400        __struct.target_component = buf.get_u8();
29401        Ok(__struct)
29402    }
29403    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29404        let mut __tmp = BytesMut::new(bytes);
29405        #[allow(clippy::absurd_extreme_comparisons)]
29406        #[allow(unused_comparisons)]
29407        if __tmp.remaining() < Self::ENCODED_LEN {
29408            panic!(
29409                "buffer is too small (need {} bytes, but got {})",
29410                Self::ENCODED_LEN,
29411                __tmp.remaining(),
29412            )
29413        }
29414        __tmp.put_u32_le(self.format as u32);
29415        __tmp.put_u8(self.target_system);
29416        __tmp.put_u8(self.target_component);
29417        if matches!(version, MavlinkVersion::V2) {
29418            let len = __tmp.len();
29419            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29420        } else {
29421            __tmp.len()
29422        }
29423    }
29424}
29425#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
29426#[doc = ""]
29427#[doc = "ID: 2"]
29428#[derive(Debug, Clone, PartialEq)]
29429#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29430#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29431#[cfg_attr(feature = "ts", derive(TS))]
29432#[cfg_attr(feature = "ts", ts(export))]
29433pub struct SYSTEM_TIME_DATA {
29434    #[doc = "Timestamp (UNIX epoch time)."]
29435    pub time_unix_usec: u64,
29436    #[doc = "Timestamp (time since system boot)."]
29437    pub time_boot_ms: u32,
29438}
29439impl SYSTEM_TIME_DATA {
29440    pub const ENCODED_LEN: usize = 12usize;
29441    pub const DEFAULT: Self = Self {
29442        time_unix_usec: 0_u64,
29443        time_boot_ms: 0_u32,
29444    };
29445    #[cfg(feature = "arbitrary")]
29446    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29447        use arbitrary::{Arbitrary, Unstructured};
29448        let mut buf = [0u8; 1024];
29449        rng.fill_bytes(&mut buf);
29450        let mut unstructured = Unstructured::new(&buf);
29451        Self::arbitrary(&mut unstructured).unwrap_or_default()
29452    }
29453}
29454impl Default for SYSTEM_TIME_DATA {
29455    fn default() -> Self {
29456        Self::DEFAULT.clone()
29457    }
29458}
29459impl MessageData for SYSTEM_TIME_DATA {
29460    type Message = MavMessage;
29461    const ID: u32 = 2u32;
29462    const NAME: &'static str = "SYSTEM_TIME";
29463    const EXTRA_CRC: u8 = 137u8;
29464    const ENCODED_LEN: usize = 12usize;
29465    fn deser(
29466        _version: MavlinkVersion,
29467        __input: &[u8],
29468    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29469        let avail_len = __input.len();
29470        let mut payload_buf = [0; Self::ENCODED_LEN];
29471        let mut buf = if avail_len < Self::ENCODED_LEN {
29472            payload_buf[0..avail_len].copy_from_slice(__input);
29473            Bytes::new(&payload_buf)
29474        } else {
29475            Bytes::new(__input)
29476        };
29477        let mut __struct = Self::default();
29478        __struct.time_unix_usec = buf.get_u64_le();
29479        __struct.time_boot_ms = buf.get_u32_le();
29480        Ok(__struct)
29481    }
29482    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29483        let mut __tmp = BytesMut::new(bytes);
29484        #[allow(clippy::absurd_extreme_comparisons)]
29485        #[allow(unused_comparisons)]
29486        if __tmp.remaining() < Self::ENCODED_LEN {
29487            panic!(
29488                "buffer is too small (need {} bytes, but got {})",
29489                Self::ENCODED_LEN,
29490                __tmp.remaining(),
29491            )
29492        }
29493        __tmp.put_u64_le(self.time_unix_usec);
29494        __tmp.put_u32_le(self.time_boot_ms);
29495        if matches!(version, MavlinkVersion::V2) {
29496            let len = __tmp.len();
29497            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29498        } else {
29499            __tmp.len()
29500        }
29501    }
29502}
29503#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
29504#[doc = ""]
29505#[doc = "ID: 1"]
29506#[derive(Debug, Clone, PartialEq)]
29507#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29508#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29509#[cfg_attr(feature = "ts", derive(TS))]
29510#[cfg_attr(feature = "ts", ts(export))]
29511pub struct SYS_STATUS_DATA {
29512    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29513    pub onboard_control_sensors_present: MavSysStatusSensor,
29514    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29515    pub onboard_control_sensors_enabled: MavSysStatusSensor,
29516    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29517    pub onboard_control_sensors_health: MavSysStatusSensor,
29518    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
29519    pub load: u16,
29520    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
29521    pub voltage_battery: u16,
29522    #[doc = "Battery current, -1: Current not sent by autopilot"]
29523    pub current_battery: i16,
29524    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29525    pub drop_rate_comm: u16,
29526    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29527    pub errors_comm: u16,
29528    #[doc = "Autopilot-specific errors"]
29529    pub errors_count1: u16,
29530    #[doc = "Autopilot-specific errors"]
29531    pub errors_count2: u16,
29532    #[doc = "Autopilot-specific errors"]
29533    pub errors_count3: u16,
29534    #[doc = "Autopilot-specific errors"]
29535    pub errors_count4: u16,
29536    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
29537    pub battery_remaining: i8,
29538    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29539    #[cfg_attr(feature = "serde", serde(default))]
29540    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
29541    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29542    #[cfg_attr(feature = "serde", serde(default))]
29543    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
29544    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29545    #[cfg_attr(feature = "serde", serde(default))]
29546    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
29547}
29548impl SYS_STATUS_DATA {
29549    pub const ENCODED_LEN: usize = 43usize;
29550    pub const DEFAULT: Self = Self {
29551        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
29552        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
29553        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
29554        load: 0_u16,
29555        voltage_battery: 0_u16,
29556        current_battery: 0_i16,
29557        drop_rate_comm: 0_u16,
29558        errors_comm: 0_u16,
29559        errors_count1: 0_u16,
29560        errors_count2: 0_u16,
29561        errors_count3: 0_u16,
29562        errors_count4: 0_u16,
29563        battery_remaining: 0_i8,
29564        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
29565        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
29566        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
29567    };
29568    #[cfg(feature = "arbitrary")]
29569    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29570        use arbitrary::{Arbitrary, Unstructured};
29571        let mut buf = [0u8; 1024];
29572        rng.fill_bytes(&mut buf);
29573        let mut unstructured = Unstructured::new(&buf);
29574        Self::arbitrary(&mut unstructured).unwrap_or_default()
29575    }
29576}
29577impl Default for SYS_STATUS_DATA {
29578    fn default() -> Self {
29579        Self::DEFAULT.clone()
29580    }
29581}
29582impl MessageData for SYS_STATUS_DATA {
29583    type Message = MavMessage;
29584    const ID: u32 = 1u32;
29585    const NAME: &'static str = "SYS_STATUS";
29586    const EXTRA_CRC: u8 = 124u8;
29587    const ENCODED_LEN: usize = 43usize;
29588    fn deser(
29589        _version: MavlinkVersion,
29590        __input: &[u8],
29591    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29592        let avail_len = __input.len();
29593        let mut payload_buf = [0; Self::ENCODED_LEN];
29594        let mut buf = if avail_len < Self::ENCODED_LEN {
29595            payload_buf[0..avail_len].copy_from_slice(__input);
29596            Bytes::new(&payload_buf)
29597        } else {
29598            Bytes::new(__input)
29599        };
29600        let mut __struct = Self::default();
29601        let tmp = buf.get_u32_le();
29602        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
29603            tmp & MavSysStatusSensor::all().bits(),
29604        )
29605        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29606            flag_type: "MavSysStatusSensor",
29607            value: tmp as u32,
29608        })?;
29609        let tmp = buf.get_u32_le();
29610        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
29611            tmp & MavSysStatusSensor::all().bits(),
29612        )
29613        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29614            flag_type: "MavSysStatusSensor",
29615            value: tmp as u32,
29616        })?;
29617        let tmp = buf.get_u32_le();
29618        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
29619            tmp & MavSysStatusSensor::all().bits(),
29620        )
29621        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29622            flag_type: "MavSysStatusSensor",
29623            value: tmp as u32,
29624        })?;
29625        __struct.load = buf.get_u16_le();
29626        __struct.voltage_battery = buf.get_u16_le();
29627        __struct.current_battery = buf.get_i16_le();
29628        __struct.drop_rate_comm = buf.get_u16_le();
29629        __struct.errors_comm = buf.get_u16_le();
29630        __struct.errors_count1 = buf.get_u16_le();
29631        __struct.errors_count2 = buf.get_u16_le();
29632        __struct.errors_count3 = buf.get_u16_le();
29633        __struct.errors_count4 = buf.get_u16_le();
29634        __struct.battery_remaining = buf.get_i8();
29635        let tmp = buf.get_u32_le();
29636        __struct.onboard_control_sensors_present_extended =
29637            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
29638                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29639                flag_type: "MavSysStatusSensorExtended",
29640                value: tmp as u32,
29641            })?;
29642        let tmp = buf.get_u32_le();
29643        __struct.onboard_control_sensors_enabled_extended =
29644            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
29645                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29646                flag_type: "MavSysStatusSensorExtended",
29647                value: tmp as u32,
29648            })?;
29649        let tmp = buf.get_u32_le();
29650        __struct.onboard_control_sensors_health_extended =
29651            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
29652                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29653                flag_type: "MavSysStatusSensorExtended",
29654                value: tmp as u32,
29655            })?;
29656        Ok(__struct)
29657    }
29658    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29659        let mut __tmp = BytesMut::new(bytes);
29660        #[allow(clippy::absurd_extreme_comparisons)]
29661        #[allow(unused_comparisons)]
29662        if __tmp.remaining() < Self::ENCODED_LEN {
29663            panic!(
29664                "buffer is too small (need {} bytes, but got {})",
29665                Self::ENCODED_LEN,
29666                __tmp.remaining(),
29667            )
29668        }
29669        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
29670        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
29671        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
29672        __tmp.put_u16_le(self.load);
29673        __tmp.put_u16_le(self.voltage_battery);
29674        __tmp.put_i16_le(self.current_battery);
29675        __tmp.put_u16_le(self.drop_rate_comm);
29676        __tmp.put_u16_le(self.errors_comm);
29677        __tmp.put_u16_le(self.errors_count1);
29678        __tmp.put_u16_le(self.errors_count2);
29679        __tmp.put_u16_le(self.errors_count3);
29680        __tmp.put_u16_le(self.errors_count4);
29681        __tmp.put_i8(self.battery_remaining);
29682        if matches!(version, MavlinkVersion::V2) {
29683            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
29684            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
29685            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
29686            let len = __tmp.len();
29687            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29688        } else {
29689            __tmp.len()
29690        }
29691    }
29692}
29693#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
29694#[doc = ""]
29695#[doc = "ID: 135"]
29696#[derive(Debug, Clone, PartialEq)]
29697#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29698#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29699#[cfg_attr(feature = "ts", derive(TS))]
29700#[cfg_attr(feature = "ts", ts(export))]
29701pub struct TERRAIN_CHECK_DATA {
29702    #[doc = "Latitude"]
29703    pub lat: i32,
29704    #[doc = "Longitude"]
29705    pub lon: i32,
29706}
29707impl TERRAIN_CHECK_DATA {
29708    pub const ENCODED_LEN: usize = 8usize;
29709    pub const DEFAULT: Self = Self {
29710        lat: 0_i32,
29711        lon: 0_i32,
29712    };
29713    #[cfg(feature = "arbitrary")]
29714    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29715        use arbitrary::{Arbitrary, Unstructured};
29716        let mut buf = [0u8; 1024];
29717        rng.fill_bytes(&mut buf);
29718        let mut unstructured = Unstructured::new(&buf);
29719        Self::arbitrary(&mut unstructured).unwrap_or_default()
29720    }
29721}
29722impl Default for TERRAIN_CHECK_DATA {
29723    fn default() -> Self {
29724        Self::DEFAULT.clone()
29725    }
29726}
29727impl MessageData for TERRAIN_CHECK_DATA {
29728    type Message = MavMessage;
29729    const ID: u32 = 135u32;
29730    const NAME: &'static str = "TERRAIN_CHECK";
29731    const EXTRA_CRC: u8 = 203u8;
29732    const ENCODED_LEN: usize = 8usize;
29733    fn deser(
29734        _version: MavlinkVersion,
29735        __input: &[u8],
29736    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29737        let avail_len = __input.len();
29738        let mut payload_buf = [0; Self::ENCODED_LEN];
29739        let mut buf = if avail_len < Self::ENCODED_LEN {
29740            payload_buf[0..avail_len].copy_from_slice(__input);
29741            Bytes::new(&payload_buf)
29742        } else {
29743            Bytes::new(__input)
29744        };
29745        let mut __struct = Self::default();
29746        __struct.lat = buf.get_i32_le();
29747        __struct.lon = buf.get_i32_le();
29748        Ok(__struct)
29749    }
29750    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29751        let mut __tmp = BytesMut::new(bytes);
29752        #[allow(clippy::absurd_extreme_comparisons)]
29753        #[allow(unused_comparisons)]
29754        if __tmp.remaining() < Self::ENCODED_LEN {
29755            panic!(
29756                "buffer is too small (need {} bytes, but got {})",
29757                Self::ENCODED_LEN,
29758                __tmp.remaining(),
29759            )
29760        }
29761        __tmp.put_i32_le(self.lat);
29762        __tmp.put_i32_le(self.lon);
29763        if matches!(version, MavlinkVersion::V2) {
29764            let len = __tmp.len();
29765            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29766        } else {
29767            __tmp.len()
29768        }
29769    }
29770}
29771#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29772#[doc = ""]
29773#[doc = "ID: 134"]
29774#[derive(Debug, Clone, PartialEq)]
29775#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29776#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29777#[cfg_attr(feature = "ts", derive(TS))]
29778#[cfg_attr(feature = "ts", ts(export))]
29779pub struct TERRAIN_DATA_DATA {
29780    #[doc = "Latitude of SW corner of first grid"]
29781    pub lat: i32,
29782    #[doc = "Longitude of SW corner of first grid"]
29783    pub lon: i32,
29784    #[doc = "Grid spacing"]
29785    pub grid_spacing: u16,
29786    #[doc = "Terrain data MSL"]
29787    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29788    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29789    pub data: [i16; 16],
29790    #[doc = "bit within the terrain request mask"]
29791    pub gridbit: u8,
29792}
29793impl TERRAIN_DATA_DATA {
29794    pub const ENCODED_LEN: usize = 43usize;
29795    pub const DEFAULT: Self = Self {
29796        lat: 0_i32,
29797        lon: 0_i32,
29798        grid_spacing: 0_u16,
29799        data: [0_i16; 16usize],
29800        gridbit: 0_u8,
29801    };
29802    #[cfg(feature = "arbitrary")]
29803    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29804        use arbitrary::{Arbitrary, Unstructured};
29805        let mut buf = [0u8; 1024];
29806        rng.fill_bytes(&mut buf);
29807        let mut unstructured = Unstructured::new(&buf);
29808        Self::arbitrary(&mut unstructured).unwrap_or_default()
29809    }
29810}
29811impl Default for TERRAIN_DATA_DATA {
29812    fn default() -> Self {
29813        Self::DEFAULT.clone()
29814    }
29815}
29816impl MessageData for TERRAIN_DATA_DATA {
29817    type Message = MavMessage;
29818    const ID: u32 = 134u32;
29819    const NAME: &'static str = "TERRAIN_DATA";
29820    const EXTRA_CRC: u8 = 229u8;
29821    const ENCODED_LEN: usize = 43usize;
29822    fn deser(
29823        _version: MavlinkVersion,
29824        __input: &[u8],
29825    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29826        let avail_len = __input.len();
29827        let mut payload_buf = [0; Self::ENCODED_LEN];
29828        let mut buf = if avail_len < Self::ENCODED_LEN {
29829            payload_buf[0..avail_len].copy_from_slice(__input);
29830            Bytes::new(&payload_buf)
29831        } else {
29832            Bytes::new(__input)
29833        };
29834        let mut __struct = Self::default();
29835        __struct.lat = buf.get_i32_le();
29836        __struct.lon = buf.get_i32_le();
29837        __struct.grid_spacing = buf.get_u16_le();
29838        for v in &mut __struct.data {
29839            let val = buf.get_i16_le();
29840            *v = val;
29841        }
29842        __struct.gridbit = buf.get_u8();
29843        Ok(__struct)
29844    }
29845    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29846        let mut __tmp = BytesMut::new(bytes);
29847        #[allow(clippy::absurd_extreme_comparisons)]
29848        #[allow(unused_comparisons)]
29849        if __tmp.remaining() < Self::ENCODED_LEN {
29850            panic!(
29851                "buffer is too small (need {} bytes, but got {})",
29852                Self::ENCODED_LEN,
29853                __tmp.remaining(),
29854            )
29855        }
29856        __tmp.put_i32_le(self.lat);
29857        __tmp.put_i32_le(self.lon);
29858        __tmp.put_u16_le(self.grid_spacing);
29859        for val in &self.data {
29860            __tmp.put_i16_le(*val);
29861        }
29862        __tmp.put_u8(self.gridbit);
29863        if matches!(version, MavlinkVersion::V2) {
29864            let len = __tmp.len();
29865            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29866        } else {
29867            __tmp.len()
29868        }
29869    }
29870}
29871#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29872#[doc = ""]
29873#[doc = "ID: 136"]
29874#[derive(Debug, Clone, PartialEq)]
29875#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29876#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29877#[cfg_attr(feature = "ts", derive(TS))]
29878#[cfg_attr(feature = "ts", ts(export))]
29879pub struct TERRAIN_REPORT_DATA {
29880    #[doc = "Latitude"]
29881    pub lat: i32,
29882    #[doc = "Longitude"]
29883    pub lon: i32,
29884    #[doc = "Terrain height MSL"]
29885    pub terrain_height: f32,
29886    #[doc = "Current vehicle height above lat/lon terrain height"]
29887    pub current_height: f32,
29888    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
29889    pub spacing: u16,
29890    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
29891    pub pending: u16,
29892    #[doc = "Number of 4x4 terrain blocks in memory"]
29893    pub loaded: u16,
29894}
29895impl TERRAIN_REPORT_DATA {
29896    pub const ENCODED_LEN: usize = 22usize;
29897    pub const DEFAULT: Self = Self {
29898        lat: 0_i32,
29899        lon: 0_i32,
29900        terrain_height: 0.0_f32,
29901        current_height: 0.0_f32,
29902        spacing: 0_u16,
29903        pending: 0_u16,
29904        loaded: 0_u16,
29905    };
29906    #[cfg(feature = "arbitrary")]
29907    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29908        use arbitrary::{Arbitrary, Unstructured};
29909        let mut buf = [0u8; 1024];
29910        rng.fill_bytes(&mut buf);
29911        let mut unstructured = Unstructured::new(&buf);
29912        Self::arbitrary(&mut unstructured).unwrap_or_default()
29913    }
29914}
29915impl Default for TERRAIN_REPORT_DATA {
29916    fn default() -> Self {
29917        Self::DEFAULT.clone()
29918    }
29919}
29920impl MessageData for TERRAIN_REPORT_DATA {
29921    type Message = MavMessage;
29922    const ID: u32 = 136u32;
29923    const NAME: &'static str = "TERRAIN_REPORT";
29924    const EXTRA_CRC: u8 = 1u8;
29925    const ENCODED_LEN: usize = 22usize;
29926    fn deser(
29927        _version: MavlinkVersion,
29928        __input: &[u8],
29929    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29930        let avail_len = __input.len();
29931        let mut payload_buf = [0; Self::ENCODED_LEN];
29932        let mut buf = if avail_len < Self::ENCODED_LEN {
29933            payload_buf[0..avail_len].copy_from_slice(__input);
29934            Bytes::new(&payload_buf)
29935        } else {
29936            Bytes::new(__input)
29937        };
29938        let mut __struct = Self::default();
29939        __struct.lat = buf.get_i32_le();
29940        __struct.lon = buf.get_i32_le();
29941        __struct.terrain_height = buf.get_f32_le();
29942        __struct.current_height = buf.get_f32_le();
29943        __struct.spacing = buf.get_u16_le();
29944        __struct.pending = buf.get_u16_le();
29945        __struct.loaded = buf.get_u16_le();
29946        Ok(__struct)
29947    }
29948    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29949        let mut __tmp = BytesMut::new(bytes);
29950        #[allow(clippy::absurd_extreme_comparisons)]
29951        #[allow(unused_comparisons)]
29952        if __tmp.remaining() < Self::ENCODED_LEN {
29953            panic!(
29954                "buffer is too small (need {} bytes, but got {})",
29955                Self::ENCODED_LEN,
29956                __tmp.remaining(),
29957            )
29958        }
29959        __tmp.put_i32_le(self.lat);
29960        __tmp.put_i32_le(self.lon);
29961        __tmp.put_f32_le(self.terrain_height);
29962        __tmp.put_f32_le(self.current_height);
29963        __tmp.put_u16_le(self.spacing);
29964        __tmp.put_u16_le(self.pending);
29965        __tmp.put_u16_le(self.loaded);
29966        if matches!(version, MavlinkVersion::V2) {
29967            let len = __tmp.len();
29968            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29969        } else {
29970            __tmp.len()
29971        }
29972    }
29973}
29974#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29975#[doc = ""]
29976#[doc = "ID: 133"]
29977#[derive(Debug, Clone, PartialEq)]
29978#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29979#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29980#[cfg_attr(feature = "ts", derive(TS))]
29981#[cfg_attr(feature = "ts", ts(export))]
29982pub struct TERRAIN_REQUEST_DATA {
29983    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
29984    pub mask: u64,
29985    #[doc = "Latitude of SW corner of first grid"]
29986    pub lat: i32,
29987    #[doc = "Longitude of SW corner of first grid"]
29988    pub lon: i32,
29989    #[doc = "Grid spacing"]
29990    pub grid_spacing: u16,
29991}
29992impl TERRAIN_REQUEST_DATA {
29993    pub const ENCODED_LEN: usize = 18usize;
29994    pub const DEFAULT: Self = Self {
29995        mask: 0_u64,
29996        lat: 0_i32,
29997        lon: 0_i32,
29998        grid_spacing: 0_u16,
29999    };
30000    #[cfg(feature = "arbitrary")]
30001    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30002        use arbitrary::{Arbitrary, Unstructured};
30003        let mut buf = [0u8; 1024];
30004        rng.fill_bytes(&mut buf);
30005        let mut unstructured = Unstructured::new(&buf);
30006        Self::arbitrary(&mut unstructured).unwrap_or_default()
30007    }
30008}
30009impl Default for TERRAIN_REQUEST_DATA {
30010    fn default() -> Self {
30011        Self::DEFAULT.clone()
30012    }
30013}
30014impl MessageData for TERRAIN_REQUEST_DATA {
30015    type Message = MavMessage;
30016    const ID: u32 = 133u32;
30017    const NAME: &'static str = "TERRAIN_REQUEST";
30018    const EXTRA_CRC: u8 = 6u8;
30019    const ENCODED_LEN: usize = 18usize;
30020    fn deser(
30021        _version: MavlinkVersion,
30022        __input: &[u8],
30023    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30024        let avail_len = __input.len();
30025        let mut payload_buf = [0; Self::ENCODED_LEN];
30026        let mut buf = if avail_len < Self::ENCODED_LEN {
30027            payload_buf[0..avail_len].copy_from_slice(__input);
30028            Bytes::new(&payload_buf)
30029        } else {
30030            Bytes::new(__input)
30031        };
30032        let mut __struct = Self::default();
30033        __struct.mask = buf.get_u64_le();
30034        __struct.lat = buf.get_i32_le();
30035        __struct.lon = buf.get_i32_le();
30036        __struct.grid_spacing = buf.get_u16_le();
30037        Ok(__struct)
30038    }
30039    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30040        let mut __tmp = BytesMut::new(bytes);
30041        #[allow(clippy::absurd_extreme_comparisons)]
30042        #[allow(unused_comparisons)]
30043        if __tmp.remaining() < Self::ENCODED_LEN {
30044            panic!(
30045                "buffer is too small (need {} bytes, but got {})",
30046                Self::ENCODED_LEN,
30047                __tmp.remaining(),
30048            )
30049        }
30050        __tmp.put_u64_le(self.mask);
30051        __tmp.put_i32_le(self.lat);
30052        __tmp.put_i32_le(self.lon);
30053        __tmp.put_u16_le(self.grid_spacing);
30054        if matches!(version, MavlinkVersion::V2) {
30055            let len = __tmp.len();
30056            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30057        } else {
30058            __tmp.len()
30059        }
30060    }
30061}
30062#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
30063#[doc = ""]
30064#[doc = "ID: 111"]
30065#[derive(Debug, Clone, PartialEq)]
30066#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30067#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30068#[cfg_attr(feature = "ts", derive(TS))]
30069#[cfg_attr(feature = "ts", ts(export))]
30070pub struct TIMESYNC_DATA {
30071    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
30072    pub tc1: i64,
30073    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
30074    pub ts1: i64,
30075    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
30076    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30077    pub target_system: u8,
30078    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
30079    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30080    pub target_component: u8,
30081}
30082impl TIMESYNC_DATA {
30083    pub const ENCODED_LEN: usize = 18usize;
30084    pub const DEFAULT: Self = Self {
30085        tc1: 0_i64,
30086        ts1: 0_i64,
30087        target_system: 0_u8,
30088        target_component: 0_u8,
30089    };
30090    #[cfg(feature = "arbitrary")]
30091    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30092        use arbitrary::{Arbitrary, Unstructured};
30093        let mut buf = [0u8; 1024];
30094        rng.fill_bytes(&mut buf);
30095        let mut unstructured = Unstructured::new(&buf);
30096        Self::arbitrary(&mut unstructured).unwrap_or_default()
30097    }
30098}
30099impl Default for TIMESYNC_DATA {
30100    fn default() -> Self {
30101        Self::DEFAULT.clone()
30102    }
30103}
30104impl MessageData for TIMESYNC_DATA {
30105    type Message = MavMessage;
30106    const ID: u32 = 111u32;
30107    const NAME: &'static str = "TIMESYNC";
30108    const EXTRA_CRC: u8 = 34u8;
30109    const ENCODED_LEN: usize = 18usize;
30110    fn deser(
30111        _version: MavlinkVersion,
30112        __input: &[u8],
30113    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30114        let avail_len = __input.len();
30115        let mut payload_buf = [0; Self::ENCODED_LEN];
30116        let mut buf = if avail_len < Self::ENCODED_LEN {
30117            payload_buf[0..avail_len].copy_from_slice(__input);
30118            Bytes::new(&payload_buf)
30119        } else {
30120            Bytes::new(__input)
30121        };
30122        let mut __struct = Self::default();
30123        __struct.tc1 = buf.get_i64_le();
30124        __struct.ts1 = buf.get_i64_le();
30125        __struct.target_system = buf.get_u8();
30126        __struct.target_component = buf.get_u8();
30127        Ok(__struct)
30128    }
30129    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30130        let mut __tmp = BytesMut::new(bytes);
30131        #[allow(clippy::absurd_extreme_comparisons)]
30132        #[allow(unused_comparisons)]
30133        if __tmp.remaining() < Self::ENCODED_LEN {
30134            panic!(
30135                "buffer is too small (need {} bytes, but got {})",
30136                Self::ENCODED_LEN,
30137                __tmp.remaining(),
30138            )
30139        }
30140        __tmp.put_i64_le(self.tc1);
30141        __tmp.put_i64_le(self.ts1);
30142        if matches!(version, MavlinkVersion::V2) {
30143            __tmp.put_u8(self.target_system);
30144            __tmp.put_u8(self.target_component);
30145            let len = __tmp.len();
30146            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30147        } else {
30148            __tmp.len()
30149        }
30150    }
30151}
30152#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
30153#[doc = ""]
30154#[doc = "ID: 380"]
30155#[derive(Debug, Clone, PartialEq)]
30156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30158#[cfg_attr(feature = "ts", derive(TS))]
30159#[cfg_attr(feature = "ts", ts(export))]
30160pub struct TIME_ESTIMATE_TO_TARGET_DATA {
30161    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
30162    pub safe_return: i32,
30163    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
30164    pub land: i32,
30165    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
30166    pub mission_next_item: i32,
30167    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
30168    pub mission_end: i32,
30169    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
30170    pub commanded_action: i32,
30171}
30172impl TIME_ESTIMATE_TO_TARGET_DATA {
30173    pub const ENCODED_LEN: usize = 20usize;
30174    pub const DEFAULT: Self = Self {
30175        safe_return: 0_i32,
30176        land: 0_i32,
30177        mission_next_item: 0_i32,
30178        mission_end: 0_i32,
30179        commanded_action: 0_i32,
30180    };
30181    #[cfg(feature = "arbitrary")]
30182    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30183        use arbitrary::{Arbitrary, Unstructured};
30184        let mut buf = [0u8; 1024];
30185        rng.fill_bytes(&mut buf);
30186        let mut unstructured = Unstructured::new(&buf);
30187        Self::arbitrary(&mut unstructured).unwrap_or_default()
30188    }
30189}
30190impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
30191    fn default() -> Self {
30192        Self::DEFAULT.clone()
30193    }
30194}
30195impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
30196    type Message = MavMessage;
30197    const ID: u32 = 380u32;
30198    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
30199    const EXTRA_CRC: u8 = 232u8;
30200    const ENCODED_LEN: usize = 20usize;
30201    fn deser(
30202        _version: MavlinkVersion,
30203        __input: &[u8],
30204    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30205        let avail_len = __input.len();
30206        let mut payload_buf = [0; Self::ENCODED_LEN];
30207        let mut buf = if avail_len < Self::ENCODED_LEN {
30208            payload_buf[0..avail_len].copy_from_slice(__input);
30209            Bytes::new(&payload_buf)
30210        } else {
30211            Bytes::new(__input)
30212        };
30213        let mut __struct = Self::default();
30214        __struct.safe_return = buf.get_i32_le();
30215        __struct.land = buf.get_i32_le();
30216        __struct.mission_next_item = buf.get_i32_le();
30217        __struct.mission_end = buf.get_i32_le();
30218        __struct.commanded_action = buf.get_i32_le();
30219        Ok(__struct)
30220    }
30221    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30222        let mut __tmp = BytesMut::new(bytes);
30223        #[allow(clippy::absurd_extreme_comparisons)]
30224        #[allow(unused_comparisons)]
30225        if __tmp.remaining() < Self::ENCODED_LEN {
30226            panic!(
30227                "buffer is too small (need {} bytes, but got {})",
30228                Self::ENCODED_LEN,
30229                __tmp.remaining(),
30230            )
30231        }
30232        __tmp.put_i32_le(self.safe_return);
30233        __tmp.put_i32_le(self.land);
30234        __tmp.put_i32_le(self.mission_next_item);
30235        __tmp.put_i32_le(self.mission_end);
30236        __tmp.put_i32_le(self.commanded_action);
30237        if matches!(version, MavlinkVersion::V2) {
30238            let len = __tmp.len();
30239            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30240        } else {
30241            __tmp.len()
30242        }
30243    }
30244}
30245#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
30246#[doc = ""]
30247#[doc = "ID: 333"]
30248#[derive(Debug, Clone, PartialEq)]
30249#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30250#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30251#[cfg_attr(feature = "ts", derive(TS))]
30252#[cfg_attr(feature = "ts", ts(export))]
30253pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30254    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30255    pub time_usec: u64,
30256    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
30257    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30258    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30259    pub pos_x: [f32; 5],
30260    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
30261    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30262    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30263    pub pos_y: [f32; 5],
30264    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
30265    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30266    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30267    pub pos_z: [f32; 5],
30268    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
30269    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30270    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30271    pub delta: [f32; 5],
30272    #[doc = "Yaw. Set to NaN for unchanged"]
30273    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30274    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30275    pub pos_yaw: [f32; 5],
30276    #[doc = "Number of valid control points (up-to 5 points are possible)"]
30277    pub valid_points: u8,
30278}
30279impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30280    pub const ENCODED_LEN: usize = 109usize;
30281    pub const DEFAULT: Self = Self {
30282        time_usec: 0_u64,
30283        pos_x: [0.0_f32; 5usize],
30284        pos_y: [0.0_f32; 5usize],
30285        pos_z: [0.0_f32; 5usize],
30286        delta: [0.0_f32; 5usize],
30287        pos_yaw: [0.0_f32; 5usize],
30288        valid_points: 0_u8,
30289    };
30290    #[cfg(feature = "arbitrary")]
30291    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30292        use arbitrary::{Arbitrary, Unstructured};
30293        let mut buf = [0u8; 1024];
30294        rng.fill_bytes(&mut buf);
30295        let mut unstructured = Unstructured::new(&buf);
30296        Self::arbitrary(&mut unstructured).unwrap_or_default()
30297    }
30298}
30299impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30300    fn default() -> Self {
30301        Self::DEFAULT.clone()
30302    }
30303}
30304impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30305    type Message = MavMessage;
30306    const ID: u32 = 333u32;
30307    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
30308    const EXTRA_CRC: u8 = 231u8;
30309    const ENCODED_LEN: usize = 109usize;
30310    fn deser(
30311        _version: MavlinkVersion,
30312        __input: &[u8],
30313    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30314        let avail_len = __input.len();
30315        let mut payload_buf = [0; Self::ENCODED_LEN];
30316        let mut buf = if avail_len < Self::ENCODED_LEN {
30317            payload_buf[0..avail_len].copy_from_slice(__input);
30318            Bytes::new(&payload_buf)
30319        } else {
30320            Bytes::new(__input)
30321        };
30322        let mut __struct = Self::default();
30323        __struct.time_usec = buf.get_u64_le();
30324        for v in &mut __struct.pos_x {
30325            let val = buf.get_f32_le();
30326            *v = val;
30327        }
30328        for v in &mut __struct.pos_y {
30329            let val = buf.get_f32_le();
30330            *v = val;
30331        }
30332        for v in &mut __struct.pos_z {
30333            let val = buf.get_f32_le();
30334            *v = val;
30335        }
30336        for v in &mut __struct.delta {
30337            let val = buf.get_f32_le();
30338            *v = val;
30339        }
30340        for v in &mut __struct.pos_yaw {
30341            let val = buf.get_f32_le();
30342            *v = val;
30343        }
30344        __struct.valid_points = buf.get_u8();
30345        Ok(__struct)
30346    }
30347    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30348        let mut __tmp = BytesMut::new(bytes);
30349        #[allow(clippy::absurd_extreme_comparisons)]
30350        #[allow(unused_comparisons)]
30351        if __tmp.remaining() < Self::ENCODED_LEN {
30352            panic!(
30353                "buffer is too small (need {} bytes, but got {})",
30354                Self::ENCODED_LEN,
30355                __tmp.remaining(),
30356            )
30357        }
30358        __tmp.put_u64_le(self.time_usec);
30359        for val in &self.pos_x {
30360            __tmp.put_f32_le(*val);
30361        }
30362        for val in &self.pos_y {
30363            __tmp.put_f32_le(*val);
30364        }
30365        for val in &self.pos_z {
30366            __tmp.put_f32_le(*val);
30367        }
30368        for val in &self.delta {
30369            __tmp.put_f32_le(*val);
30370        }
30371        for val in &self.pos_yaw {
30372            __tmp.put_f32_le(*val);
30373        }
30374        __tmp.put_u8(self.valid_points);
30375        if matches!(version, MavlinkVersion::V2) {
30376            let len = __tmp.len();
30377            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30378        } else {
30379            __tmp.len()
30380        }
30381    }
30382}
30383#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
30384#[doc = ""]
30385#[doc = "ID: 332"]
30386#[derive(Debug, Clone, PartialEq)]
30387#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30388#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30389#[cfg_attr(feature = "ts", derive(TS))]
30390#[cfg_attr(feature = "ts", ts(export))]
30391pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30392    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30393    pub time_usec: u64,
30394    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
30395    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30396    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30397    pub pos_x: [f32; 5],
30398    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
30399    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30400    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30401    pub pos_y: [f32; 5],
30402    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
30403    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30404    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30405    pub pos_z: [f32; 5],
30406    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
30407    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30408    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30409    pub vel_x: [f32; 5],
30410    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
30411    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30412    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30413    pub vel_y: [f32; 5],
30414    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
30415    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30416    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30417    pub vel_z: [f32; 5],
30418    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
30419    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30420    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30421    pub acc_x: [f32; 5],
30422    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
30423    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30424    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30425    pub acc_y: [f32; 5],
30426    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
30427    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30428    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30429    pub acc_z: [f32; 5],
30430    #[doc = "Yaw angle, set to NaN if not being used"]
30431    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30432    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30433    pub pos_yaw: [f32; 5],
30434    #[doc = "Yaw rate, set to NaN if not being used"]
30435    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30436    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30437    pub vel_yaw: [f32; 5],
30438    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
30439    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30440    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30441    pub command: [u16; 5],
30442    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
30443    pub valid_points: u8,
30444}
30445impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30446    pub const ENCODED_LEN: usize = 239usize;
30447    pub const DEFAULT: Self = Self {
30448        time_usec: 0_u64,
30449        pos_x: [0.0_f32; 5usize],
30450        pos_y: [0.0_f32; 5usize],
30451        pos_z: [0.0_f32; 5usize],
30452        vel_x: [0.0_f32; 5usize],
30453        vel_y: [0.0_f32; 5usize],
30454        vel_z: [0.0_f32; 5usize],
30455        acc_x: [0.0_f32; 5usize],
30456        acc_y: [0.0_f32; 5usize],
30457        acc_z: [0.0_f32; 5usize],
30458        pos_yaw: [0.0_f32; 5usize],
30459        vel_yaw: [0.0_f32; 5usize],
30460        command: [0_u16; 5usize],
30461        valid_points: 0_u8,
30462    };
30463    #[cfg(feature = "arbitrary")]
30464    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30465        use arbitrary::{Arbitrary, Unstructured};
30466        let mut buf = [0u8; 1024];
30467        rng.fill_bytes(&mut buf);
30468        let mut unstructured = Unstructured::new(&buf);
30469        Self::arbitrary(&mut unstructured).unwrap_or_default()
30470    }
30471}
30472impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30473    fn default() -> Self {
30474        Self::DEFAULT.clone()
30475    }
30476}
30477impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30478    type Message = MavMessage;
30479    const ID: u32 = 332u32;
30480    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
30481    const EXTRA_CRC: u8 = 236u8;
30482    const ENCODED_LEN: usize = 239usize;
30483    fn deser(
30484        _version: MavlinkVersion,
30485        __input: &[u8],
30486    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30487        let avail_len = __input.len();
30488        let mut payload_buf = [0; Self::ENCODED_LEN];
30489        let mut buf = if avail_len < Self::ENCODED_LEN {
30490            payload_buf[0..avail_len].copy_from_slice(__input);
30491            Bytes::new(&payload_buf)
30492        } else {
30493            Bytes::new(__input)
30494        };
30495        let mut __struct = Self::default();
30496        __struct.time_usec = buf.get_u64_le();
30497        for v in &mut __struct.pos_x {
30498            let val = buf.get_f32_le();
30499            *v = val;
30500        }
30501        for v in &mut __struct.pos_y {
30502            let val = buf.get_f32_le();
30503            *v = val;
30504        }
30505        for v in &mut __struct.pos_z {
30506            let val = buf.get_f32_le();
30507            *v = val;
30508        }
30509        for v in &mut __struct.vel_x {
30510            let val = buf.get_f32_le();
30511            *v = val;
30512        }
30513        for v in &mut __struct.vel_y {
30514            let val = buf.get_f32_le();
30515            *v = val;
30516        }
30517        for v in &mut __struct.vel_z {
30518            let val = buf.get_f32_le();
30519            *v = val;
30520        }
30521        for v in &mut __struct.acc_x {
30522            let val = buf.get_f32_le();
30523            *v = val;
30524        }
30525        for v in &mut __struct.acc_y {
30526            let val = buf.get_f32_le();
30527            *v = val;
30528        }
30529        for v in &mut __struct.acc_z {
30530            let val = buf.get_f32_le();
30531            *v = val;
30532        }
30533        for v in &mut __struct.pos_yaw {
30534            let val = buf.get_f32_le();
30535            *v = val;
30536        }
30537        for v in &mut __struct.vel_yaw {
30538            let val = buf.get_f32_le();
30539            *v = val;
30540        }
30541        for v in &mut __struct.command {
30542            let val = buf.get_u16_le();
30543            *v = val;
30544        }
30545        __struct.valid_points = buf.get_u8();
30546        Ok(__struct)
30547    }
30548    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30549        let mut __tmp = BytesMut::new(bytes);
30550        #[allow(clippy::absurd_extreme_comparisons)]
30551        #[allow(unused_comparisons)]
30552        if __tmp.remaining() < Self::ENCODED_LEN {
30553            panic!(
30554                "buffer is too small (need {} bytes, but got {})",
30555                Self::ENCODED_LEN,
30556                __tmp.remaining(),
30557            )
30558        }
30559        __tmp.put_u64_le(self.time_usec);
30560        for val in &self.pos_x {
30561            __tmp.put_f32_le(*val);
30562        }
30563        for val in &self.pos_y {
30564            __tmp.put_f32_le(*val);
30565        }
30566        for val in &self.pos_z {
30567            __tmp.put_f32_le(*val);
30568        }
30569        for val in &self.vel_x {
30570            __tmp.put_f32_le(*val);
30571        }
30572        for val in &self.vel_y {
30573            __tmp.put_f32_le(*val);
30574        }
30575        for val in &self.vel_z {
30576            __tmp.put_f32_le(*val);
30577        }
30578        for val in &self.acc_x {
30579            __tmp.put_f32_le(*val);
30580        }
30581        for val in &self.acc_y {
30582            __tmp.put_f32_le(*val);
30583        }
30584        for val in &self.acc_z {
30585            __tmp.put_f32_le(*val);
30586        }
30587        for val in &self.pos_yaw {
30588            __tmp.put_f32_le(*val);
30589        }
30590        for val in &self.vel_yaw {
30591            __tmp.put_f32_le(*val);
30592        }
30593        for val in &self.command {
30594            __tmp.put_u16_le(*val);
30595        }
30596        __tmp.put_u8(self.valid_points);
30597        if matches!(version, MavlinkVersion::V2) {
30598            let len = __tmp.len();
30599            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30600        } else {
30601            __tmp.len()
30602        }
30603    }
30604}
30605#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
30606#[doc = ""]
30607#[doc = "ID: 385"]
30608#[derive(Debug, Clone, PartialEq)]
30609#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30611#[cfg_attr(feature = "ts", derive(TS))]
30612#[cfg_attr(feature = "ts", ts(export))]
30613pub struct TUNNEL_DATA {
30614    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
30615    pub payload_type: MavTunnelPayloadType,
30616    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
30617    pub target_system: u8,
30618    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
30619    pub target_component: u8,
30620    #[doc = "Length of the data transported in payload"]
30621    pub payload_length: u8,
30622    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
30623    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30624    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30625    pub payload: [u8; 128],
30626}
30627impl TUNNEL_DATA {
30628    pub const ENCODED_LEN: usize = 133usize;
30629    pub const DEFAULT: Self = Self {
30630        payload_type: MavTunnelPayloadType::DEFAULT,
30631        target_system: 0_u8,
30632        target_component: 0_u8,
30633        payload_length: 0_u8,
30634        payload: [0_u8; 128usize],
30635    };
30636    #[cfg(feature = "arbitrary")]
30637    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30638        use arbitrary::{Arbitrary, Unstructured};
30639        let mut buf = [0u8; 1024];
30640        rng.fill_bytes(&mut buf);
30641        let mut unstructured = Unstructured::new(&buf);
30642        Self::arbitrary(&mut unstructured).unwrap_or_default()
30643    }
30644}
30645impl Default for TUNNEL_DATA {
30646    fn default() -> Self {
30647        Self::DEFAULT.clone()
30648    }
30649}
30650impl MessageData for TUNNEL_DATA {
30651    type Message = MavMessage;
30652    const ID: u32 = 385u32;
30653    const NAME: &'static str = "TUNNEL";
30654    const EXTRA_CRC: u8 = 147u8;
30655    const ENCODED_LEN: usize = 133usize;
30656    fn deser(
30657        _version: MavlinkVersion,
30658        __input: &[u8],
30659    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30660        let avail_len = __input.len();
30661        let mut payload_buf = [0; Self::ENCODED_LEN];
30662        let mut buf = if avail_len < Self::ENCODED_LEN {
30663            payload_buf[0..avail_len].copy_from_slice(__input);
30664            Bytes::new(&payload_buf)
30665        } else {
30666            Bytes::new(__input)
30667        };
30668        let mut __struct = Self::default();
30669        let tmp = buf.get_u16_le();
30670        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
30671            ::mavlink_core::error::ParserError::InvalidEnum {
30672                enum_type: "MavTunnelPayloadType",
30673                value: tmp as u32,
30674            },
30675        )?;
30676        __struct.target_system = buf.get_u8();
30677        __struct.target_component = buf.get_u8();
30678        __struct.payload_length = buf.get_u8();
30679        for v in &mut __struct.payload {
30680            let val = buf.get_u8();
30681            *v = val;
30682        }
30683        Ok(__struct)
30684    }
30685    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30686        let mut __tmp = BytesMut::new(bytes);
30687        #[allow(clippy::absurd_extreme_comparisons)]
30688        #[allow(unused_comparisons)]
30689        if __tmp.remaining() < Self::ENCODED_LEN {
30690            panic!(
30691                "buffer is too small (need {} bytes, but got {})",
30692                Self::ENCODED_LEN,
30693                __tmp.remaining(),
30694            )
30695        }
30696        __tmp.put_u16_le(self.payload_type as u16);
30697        __tmp.put_u8(self.target_system);
30698        __tmp.put_u8(self.target_component);
30699        __tmp.put_u8(self.payload_length);
30700        for val in &self.payload {
30701            __tmp.put_u8(*val);
30702        }
30703        if matches!(version, MavlinkVersion::V2) {
30704            let len = __tmp.len();
30705            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30706        } else {
30707            __tmp.len()
30708        }
30709    }
30710}
30711#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
30712#[doc = ""]
30713#[doc = "ID: 311"]
30714#[derive(Debug, Clone, PartialEq)]
30715#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30716#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30717#[cfg_attr(feature = "ts", derive(TS))]
30718#[cfg_attr(feature = "ts", ts(export))]
30719pub struct UAVCAN_NODE_INFO_DATA {
30720    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30721    pub time_usec: u64,
30722    #[doc = "Time since the start-up of the node."]
30723    pub uptime_sec: u32,
30724    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
30725    pub sw_vcs_commit: u32,
30726    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
30727    #[cfg_attr(feature = "ts", ts(type = "string"))]
30728    pub name: CharArray<80>,
30729    #[doc = "Hardware major version number."]
30730    pub hw_version_major: u8,
30731    #[doc = "Hardware minor version number."]
30732    pub hw_version_minor: u8,
30733    #[doc = "Hardware unique 128-bit ID."]
30734    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30735    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30736    pub hw_unique_id: [u8; 16],
30737    #[doc = "Software major version number."]
30738    pub sw_version_major: u8,
30739    #[doc = "Software minor version number."]
30740    pub sw_version_minor: u8,
30741}
30742impl UAVCAN_NODE_INFO_DATA {
30743    pub const ENCODED_LEN: usize = 116usize;
30744    pub const DEFAULT: Self = Self {
30745        time_usec: 0_u64,
30746        uptime_sec: 0_u32,
30747        sw_vcs_commit: 0_u32,
30748        name: CharArray::new([0_u8; 80usize]),
30749        hw_version_major: 0_u8,
30750        hw_version_minor: 0_u8,
30751        hw_unique_id: [0_u8; 16usize],
30752        sw_version_major: 0_u8,
30753        sw_version_minor: 0_u8,
30754    };
30755    #[cfg(feature = "arbitrary")]
30756    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30757        use arbitrary::{Arbitrary, Unstructured};
30758        let mut buf = [0u8; 1024];
30759        rng.fill_bytes(&mut buf);
30760        let mut unstructured = Unstructured::new(&buf);
30761        Self::arbitrary(&mut unstructured).unwrap_or_default()
30762    }
30763}
30764impl Default for UAVCAN_NODE_INFO_DATA {
30765    fn default() -> Self {
30766        Self::DEFAULT.clone()
30767    }
30768}
30769impl MessageData for UAVCAN_NODE_INFO_DATA {
30770    type Message = MavMessage;
30771    const ID: u32 = 311u32;
30772    const NAME: &'static str = "UAVCAN_NODE_INFO";
30773    const EXTRA_CRC: u8 = 95u8;
30774    const ENCODED_LEN: usize = 116usize;
30775    fn deser(
30776        _version: MavlinkVersion,
30777        __input: &[u8],
30778    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30779        let avail_len = __input.len();
30780        let mut payload_buf = [0; Self::ENCODED_LEN];
30781        let mut buf = if avail_len < Self::ENCODED_LEN {
30782            payload_buf[0..avail_len].copy_from_slice(__input);
30783            Bytes::new(&payload_buf)
30784        } else {
30785            Bytes::new(__input)
30786        };
30787        let mut __struct = Self::default();
30788        __struct.time_usec = buf.get_u64_le();
30789        __struct.uptime_sec = buf.get_u32_le();
30790        __struct.sw_vcs_commit = buf.get_u32_le();
30791        let mut tmp = [0_u8; 80usize];
30792        for v in &mut tmp {
30793            *v = buf.get_u8();
30794        }
30795        __struct.name = CharArray::new(tmp);
30796        __struct.hw_version_major = buf.get_u8();
30797        __struct.hw_version_minor = buf.get_u8();
30798        for v in &mut __struct.hw_unique_id {
30799            let val = buf.get_u8();
30800            *v = val;
30801        }
30802        __struct.sw_version_major = buf.get_u8();
30803        __struct.sw_version_minor = buf.get_u8();
30804        Ok(__struct)
30805    }
30806    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30807        let mut __tmp = BytesMut::new(bytes);
30808        #[allow(clippy::absurd_extreme_comparisons)]
30809        #[allow(unused_comparisons)]
30810        if __tmp.remaining() < Self::ENCODED_LEN {
30811            panic!(
30812                "buffer is too small (need {} bytes, but got {})",
30813                Self::ENCODED_LEN,
30814                __tmp.remaining(),
30815            )
30816        }
30817        __tmp.put_u64_le(self.time_usec);
30818        __tmp.put_u32_le(self.uptime_sec);
30819        __tmp.put_u32_le(self.sw_vcs_commit);
30820        for val in &self.name {
30821            __tmp.put_u8(*val);
30822        }
30823        __tmp.put_u8(self.hw_version_major);
30824        __tmp.put_u8(self.hw_version_minor);
30825        for val in &self.hw_unique_id {
30826            __tmp.put_u8(*val);
30827        }
30828        __tmp.put_u8(self.sw_version_major);
30829        __tmp.put_u8(self.sw_version_minor);
30830        if matches!(version, MavlinkVersion::V2) {
30831            let len = __tmp.len();
30832            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30833        } else {
30834            __tmp.len()
30835        }
30836    }
30837}
30838#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
30839#[doc = ""]
30840#[doc = "ID: 310"]
30841#[derive(Debug, Clone, PartialEq)]
30842#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30843#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30844#[cfg_attr(feature = "ts", derive(TS))]
30845#[cfg_attr(feature = "ts", ts(export))]
30846pub struct UAVCAN_NODE_STATUS_DATA {
30847    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30848    pub time_usec: u64,
30849    #[doc = "Time since the start-up of the node."]
30850    pub uptime_sec: u32,
30851    #[doc = "Vendor-specific status information."]
30852    pub vendor_specific_status_code: u16,
30853    #[doc = "Generalized node health status."]
30854    pub health: UavcanNodeHealth,
30855    #[doc = "Generalized operating mode."]
30856    pub mode: UavcanNodeMode,
30857    #[doc = "Not used currently."]
30858    pub sub_mode: u8,
30859}
30860impl UAVCAN_NODE_STATUS_DATA {
30861    pub const ENCODED_LEN: usize = 17usize;
30862    pub const DEFAULT: Self = Self {
30863        time_usec: 0_u64,
30864        uptime_sec: 0_u32,
30865        vendor_specific_status_code: 0_u16,
30866        health: UavcanNodeHealth::DEFAULT,
30867        mode: UavcanNodeMode::DEFAULT,
30868        sub_mode: 0_u8,
30869    };
30870    #[cfg(feature = "arbitrary")]
30871    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30872        use arbitrary::{Arbitrary, Unstructured};
30873        let mut buf = [0u8; 1024];
30874        rng.fill_bytes(&mut buf);
30875        let mut unstructured = Unstructured::new(&buf);
30876        Self::arbitrary(&mut unstructured).unwrap_or_default()
30877    }
30878}
30879impl Default for UAVCAN_NODE_STATUS_DATA {
30880    fn default() -> Self {
30881        Self::DEFAULT.clone()
30882    }
30883}
30884impl MessageData for UAVCAN_NODE_STATUS_DATA {
30885    type Message = MavMessage;
30886    const ID: u32 = 310u32;
30887    const NAME: &'static str = "UAVCAN_NODE_STATUS";
30888    const EXTRA_CRC: u8 = 28u8;
30889    const ENCODED_LEN: usize = 17usize;
30890    fn deser(
30891        _version: MavlinkVersion,
30892        __input: &[u8],
30893    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30894        let avail_len = __input.len();
30895        let mut payload_buf = [0; Self::ENCODED_LEN];
30896        let mut buf = if avail_len < Self::ENCODED_LEN {
30897            payload_buf[0..avail_len].copy_from_slice(__input);
30898            Bytes::new(&payload_buf)
30899        } else {
30900            Bytes::new(__input)
30901        };
30902        let mut __struct = Self::default();
30903        __struct.time_usec = buf.get_u64_le();
30904        __struct.uptime_sec = buf.get_u32_le();
30905        __struct.vendor_specific_status_code = buf.get_u16_le();
30906        let tmp = buf.get_u8();
30907        __struct.health =
30908            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30909                enum_type: "UavcanNodeHealth",
30910                value: tmp as u32,
30911            })?;
30912        let tmp = buf.get_u8();
30913        __struct.mode =
30914            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30915                enum_type: "UavcanNodeMode",
30916                value: tmp as u32,
30917            })?;
30918        __struct.sub_mode = buf.get_u8();
30919        Ok(__struct)
30920    }
30921    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30922        let mut __tmp = BytesMut::new(bytes);
30923        #[allow(clippy::absurd_extreme_comparisons)]
30924        #[allow(unused_comparisons)]
30925        if __tmp.remaining() < Self::ENCODED_LEN {
30926            panic!(
30927                "buffer is too small (need {} bytes, but got {})",
30928                Self::ENCODED_LEN,
30929                __tmp.remaining(),
30930            )
30931        }
30932        __tmp.put_u64_le(self.time_usec);
30933        __tmp.put_u32_le(self.uptime_sec);
30934        __tmp.put_u16_le(self.vendor_specific_status_code);
30935        __tmp.put_u8(self.health as u8);
30936        __tmp.put_u8(self.mode as u8);
30937        __tmp.put_u8(self.sub_mode);
30938        if matches!(version, MavlinkVersion::V2) {
30939            let len = __tmp.len();
30940            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30941        } else {
30942            __tmp.len()
30943        }
30944    }
30945}
30946#[doc = "The global position resulting from GPS and sensor fusion."]
30947#[doc = ""]
30948#[doc = "ID: 340"]
30949#[derive(Debug, Clone, PartialEq)]
30950#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30951#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30952#[cfg_attr(feature = "ts", derive(TS))]
30953#[cfg_attr(feature = "ts", ts(export))]
30954pub struct UTM_GLOBAL_POSITION_DATA {
30955    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
30956    pub time: u64,
30957    #[doc = "Latitude (WGS84)"]
30958    pub lat: i32,
30959    #[doc = "Longitude (WGS84)"]
30960    pub lon: i32,
30961    #[doc = "Altitude (WGS84)"]
30962    pub alt: i32,
30963    #[doc = "Altitude above ground"]
30964    pub relative_alt: i32,
30965    #[doc = "Next waypoint, latitude (WGS84)"]
30966    pub next_lat: i32,
30967    #[doc = "Next waypoint, longitude (WGS84)"]
30968    pub next_lon: i32,
30969    #[doc = "Next waypoint, altitude (WGS84)"]
30970    pub next_alt: i32,
30971    #[doc = "Ground X speed (latitude, positive north)"]
30972    pub vx: i16,
30973    #[doc = "Ground Y speed (longitude, positive east)"]
30974    pub vy: i16,
30975    #[doc = "Ground Z speed (altitude, positive down)"]
30976    pub vz: i16,
30977    #[doc = "Horizontal position uncertainty (standard deviation)"]
30978    pub h_acc: u16,
30979    #[doc = "Altitude uncertainty (standard deviation)"]
30980    pub v_acc: u16,
30981    #[doc = "Speed uncertainty (standard deviation)"]
30982    pub vel_acc: u16,
30983    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
30984    pub update_rate: u16,
30985    #[doc = "Unique UAS ID."]
30986    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30987    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30988    pub uas_id: [u8; 18],
30989    #[doc = "Flight state"]
30990    pub flight_state: UtmFlightState,
30991    #[doc = "Bitwise OR combination of the data available flags."]
30992    pub flags: UtmDataAvailFlags,
30993}
30994impl UTM_GLOBAL_POSITION_DATA {
30995    pub const ENCODED_LEN: usize = 70usize;
30996    pub const DEFAULT: Self = Self {
30997        time: 0_u64,
30998        lat: 0_i32,
30999        lon: 0_i32,
31000        alt: 0_i32,
31001        relative_alt: 0_i32,
31002        next_lat: 0_i32,
31003        next_lon: 0_i32,
31004        next_alt: 0_i32,
31005        vx: 0_i16,
31006        vy: 0_i16,
31007        vz: 0_i16,
31008        h_acc: 0_u16,
31009        v_acc: 0_u16,
31010        vel_acc: 0_u16,
31011        update_rate: 0_u16,
31012        uas_id: [0_u8; 18usize],
31013        flight_state: UtmFlightState::DEFAULT,
31014        flags: UtmDataAvailFlags::DEFAULT,
31015    };
31016    #[cfg(feature = "arbitrary")]
31017    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31018        use arbitrary::{Arbitrary, Unstructured};
31019        let mut buf = [0u8; 1024];
31020        rng.fill_bytes(&mut buf);
31021        let mut unstructured = Unstructured::new(&buf);
31022        Self::arbitrary(&mut unstructured).unwrap_or_default()
31023    }
31024}
31025impl Default for UTM_GLOBAL_POSITION_DATA {
31026    fn default() -> Self {
31027        Self::DEFAULT.clone()
31028    }
31029}
31030impl MessageData for UTM_GLOBAL_POSITION_DATA {
31031    type Message = MavMessage;
31032    const ID: u32 = 340u32;
31033    const NAME: &'static str = "UTM_GLOBAL_POSITION";
31034    const EXTRA_CRC: u8 = 99u8;
31035    const ENCODED_LEN: usize = 70usize;
31036    fn deser(
31037        _version: MavlinkVersion,
31038        __input: &[u8],
31039    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31040        let avail_len = __input.len();
31041        let mut payload_buf = [0; Self::ENCODED_LEN];
31042        let mut buf = if avail_len < Self::ENCODED_LEN {
31043            payload_buf[0..avail_len].copy_from_slice(__input);
31044            Bytes::new(&payload_buf)
31045        } else {
31046            Bytes::new(__input)
31047        };
31048        let mut __struct = Self::default();
31049        __struct.time = buf.get_u64_le();
31050        __struct.lat = buf.get_i32_le();
31051        __struct.lon = buf.get_i32_le();
31052        __struct.alt = buf.get_i32_le();
31053        __struct.relative_alt = buf.get_i32_le();
31054        __struct.next_lat = buf.get_i32_le();
31055        __struct.next_lon = buf.get_i32_le();
31056        __struct.next_alt = buf.get_i32_le();
31057        __struct.vx = buf.get_i16_le();
31058        __struct.vy = buf.get_i16_le();
31059        __struct.vz = buf.get_i16_le();
31060        __struct.h_acc = buf.get_u16_le();
31061        __struct.v_acc = buf.get_u16_le();
31062        __struct.vel_acc = buf.get_u16_le();
31063        __struct.update_rate = buf.get_u16_le();
31064        for v in &mut __struct.uas_id {
31065            let val = buf.get_u8();
31066            *v = val;
31067        }
31068        let tmp = buf.get_u8();
31069        __struct.flight_state =
31070            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31071                enum_type: "UtmFlightState",
31072                value: tmp as u32,
31073            })?;
31074        let tmp = buf.get_u8();
31075        __struct.flags = UtmDataAvailFlags::from_bits(tmp & UtmDataAvailFlags::all().bits())
31076            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31077                flag_type: "UtmDataAvailFlags",
31078                value: tmp as u32,
31079            })?;
31080        Ok(__struct)
31081    }
31082    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31083        let mut __tmp = BytesMut::new(bytes);
31084        #[allow(clippy::absurd_extreme_comparisons)]
31085        #[allow(unused_comparisons)]
31086        if __tmp.remaining() < Self::ENCODED_LEN {
31087            panic!(
31088                "buffer is too small (need {} bytes, but got {})",
31089                Self::ENCODED_LEN,
31090                __tmp.remaining(),
31091            )
31092        }
31093        __tmp.put_u64_le(self.time);
31094        __tmp.put_i32_le(self.lat);
31095        __tmp.put_i32_le(self.lon);
31096        __tmp.put_i32_le(self.alt);
31097        __tmp.put_i32_le(self.relative_alt);
31098        __tmp.put_i32_le(self.next_lat);
31099        __tmp.put_i32_le(self.next_lon);
31100        __tmp.put_i32_le(self.next_alt);
31101        __tmp.put_i16_le(self.vx);
31102        __tmp.put_i16_le(self.vy);
31103        __tmp.put_i16_le(self.vz);
31104        __tmp.put_u16_le(self.h_acc);
31105        __tmp.put_u16_le(self.v_acc);
31106        __tmp.put_u16_le(self.vel_acc);
31107        __tmp.put_u16_le(self.update_rate);
31108        for val in &self.uas_id {
31109            __tmp.put_u8(*val);
31110        }
31111        __tmp.put_u8(self.flight_state as u8);
31112        __tmp.put_u8(self.flags.bits());
31113        if matches!(version, MavlinkVersion::V2) {
31114            let len = __tmp.len();
31115            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31116        } else {
31117            __tmp.len()
31118        }
31119    }
31120}
31121#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
31122#[doc = ""]
31123#[doc = "ID: 248"]
31124#[derive(Debug, Clone, PartialEq)]
31125#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31126#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31127#[cfg_attr(feature = "ts", derive(TS))]
31128#[cfg_attr(feature = "ts", ts(export))]
31129pub struct V2_EXTENSION_DATA {
31130    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
31131    pub message_type: u16,
31132    #[doc = "Network ID (0 for broadcast)"]
31133    pub target_network: u8,
31134    #[doc = "System ID (0 for broadcast)"]
31135    pub target_system: u8,
31136    #[doc = "Component ID (0 for broadcast)"]
31137    pub target_component: u8,
31138    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
31139    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31140    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31141    pub payload: [u8; 249],
31142}
31143impl V2_EXTENSION_DATA {
31144    pub const ENCODED_LEN: usize = 254usize;
31145    pub const DEFAULT: Self = Self {
31146        message_type: 0_u16,
31147        target_network: 0_u8,
31148        target_system: 0_u8,
31149        target_component: 0_u8,
31150        payload: [0_u8; 249usize],
31151    };
31152    #[cfg(feature = "arbitrary")]
31153    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31154        use arbitrary::{Arbitrary, Unstructured};
31155        let mut buf = [0u8; 1024];
31156        rng.fill_bytes(&mut buf);
31157        let mut unstructured = Unstructured::new(&buf);
31158        Self::arbitrary(&mut unstructured).unwrap_or_default()
31159    }
31160}
31161impl Default for V2_EXTENSION_DATA {
31162    fn default() -> Self {
31163        Self::DEFAULT.clone()
31164    }
31165}
31166impl MessageData for V2_EXTENSION_DATA {
31167    type Message = MavMessage;
31168    const ID: u32 = 248u32;
31169    const NAME: &'static str = "V2_EXTENSION";
31170    const EXTRA_CRC: u8 = 8u8;
31171    const ENCODED_LEN: usize = 254usize;
31172    fn deser(
31173        _version: MavlinkVersion,
31174        __input: &[u8],
31175    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31176        let avail_len = __input.len();
31177        let mut payload_buf = [0; Self::ENCODED_LEN];
31178        let mut buf = if avail_len < Self::ENCODED_LEN {
31179            payload_buf[0..avail_len].copy_from_slice(__input);
31180            Bytes::new(&payload_buf)
31181        } else {
31182            Bytes::new(__input)
31183        };
31184        let mut __struct = Self::default();
31185        __struct.message_type = buf.get_u16_le();
31186        __struct.target_network = buf.get_u8();
31187        __struct.target_system = buf.get_u8();
31188        __struct.target_component = buf.get_u8();
31189        for v in &mut __struct.payload {
31190            let val = buf.get_u8();
31191            *v = val;
31192        }
31193        Ok(__struct)
31194    }
31195    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31196        let mut __tmp = BytesMut::new(bytes);
31197        #[allow(clippy::absurd_extreme_comparisons)]
31198        #[allow(unused_comparisons)]
31199        if __tmp.remaining() < Self::ENCODED_LEN {
31200            panic!(
31201                "buffer is too small (need {} bytes, but got {})",
31202                Self::ENCODED_LEN,
31203                __tmp.remaining(),
31204            )
31205        }
31206        __tmp.put_u16_le(self.message_type);
31207        __tmp.put_u8(self.target_network);
31208        __tmp.put_u8(self.target_system);
31209        __tmp.put_u8(self.target_component);
31210        for val in &self.payload {
31211            __tmp.put_u8(*val);
31212        }
31213        if matches!(version, MavlinkVersion::V2) {
31214            let len = __tmp.len();
31215            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31216        } else {
31217            __tmp.len()
31218        }
31219    }
31220}
31221#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
31222#[doc = ""]
31223#[doc = "ID: 74"]
31224#[derive(Debug, Clone, PartialEq)]
31225#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31226#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31227#[cfg_attr(feature = "ts", derive(TS))]
31228#[cfg_attr(feature = "ts", ts(export))]
31229pub struct VFR_HUD_DATA {
31230    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
31231    pub airspeed: f32,
31232    #[doc = "Current ground speed."]
31233    pub groundspeed: f32,
31234    #[doc = "Current altitude (MSL)."]
31235    pub alt: f32,
31236    #[doc = "Current climb rate."]
31237    pub climb: f32,
31238    #[doc = "Current heading in compass units (0-360, 0=north)."]
31239    pub heading: i16,
31240    #[doc = "Current throttle setting (0 to 100)."]
31241    pub throttle: u16,
31242}
31243impl VFR_HUD_DATA {
31244    pub const ENCODED_LEN: usize = 20usize;
31245    pub const DEFAULT: Self = Self {
31246        airspeed: 0.0_f32,
31247        groundspeed: 0.0_f32,
31248        alt: 0.0_f32,
31249        climb: 0.0_f32,
31250        heading: 0_i16,
31251        throttle: 0_u16,
31252    };
31253    #[cfg(feature = "arbitrary")]
31254    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31255        use arbitrary::{Arbitrary, Unstructured};
31256        let mut buf = [0u8; 1024];
31257        rng.fill_bytes(&mut buf);
31258        let mut unstructured = Unstructured::new(&buf);
31259        Self::arbitrary(&mut unstructured).unwrap_or_default()
31260    }
31261}
31262impl Default for VFR_HUD_DATA {
31263    fn default() -> Self {
31264        Self::DEFAULT.clone()
31265    }
31266}
31267impl MessageData for VFR_HUD_DATA {
31268    type Message = MavMessage;
31269    const ID: u32 = 74u32;
31270    const NAME: &'static str = "VFR_HUD";
31271    const EXTRA_CRC: u8 = 20u8;
31272    const ENCODED_LEN: usize = 20usize;
31273    fn deser(
31274        _version: MavlinkVersion,
31275        __input: &[u8],
31276    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31277        let avail_len = __input.len();
31278        let mut payload_buf = [0; Self::ENCODED_LEN];
31279        let mut buf = if avail_len < Self::ENCODED_LEN {
31280            payload_buf[0..avail_len].copy_from_slice(__input);
31281            Bytes::new(&payload_buf)
31282        } else {
31283            Bytes::new(__input)
31284        };
31285        let mut __struct = Self::default();
31286        __struct.airspeed = buf.get_f32_le();
31287        __struct.groundspeed = buf.get_f32_le();
31288        __struct.alt = buf.get_f32_le();
31289        __struct.climb = buf.get_f32_le();
31290        __struct.heading = buf.get_i16_le();
31291        __struct.throttle = buf.get_u16_le();
31292        Ok(__struct)
31293    }
31294    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31295        let mut __tmp = BytesMut::new(bytes);
31296        #[allow(clippy::absurd_extreme_comparisons)]
31297        #[allow(unused_comparisons)]
31298        if __tmp.remaining() < Self::ENCODED_LEN {
31299            panic!(
31300                "buffer is too small (need {} bytes, but got {})",
31301                Self::ENCODED_LEN,
31302                __tmp.remaining(),
31303            )
31304        }
31305        __tmp.put_f32_le(self.airspeed);
31306        __tmp.put_f32_le(self.groundspeed);
31307        __tmp.put_f32_le(self.alt);
31308        __tmp.put_f32_le(self.climb);
31309        __tmp.put_i16_le(self.heading);
31310        __tmp.put_u16_le(self.throttle);
31311        if matches!(version, MavlinkVersion::V2) {
31312            let len = __tmp.len();
31313            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31314        } else {
31315            __tmp.len()
31316        }
31317    }
31318}
31319#[doc = "Vibration levels and accelerometer clipping."]
31320#[doc = ""]
31321#[doc = "ID: 241"]
31322#[derive(Debug, Clone, PartialEq)]
31323#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31324#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31325#[cfg_attr(feature = "ts", derive(TS))]
31326#[cfg_attr(feature = "ts", ts(export))]
31327pub struct VIBRATION_DATA {
31328    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31329    pub time_usec: u64,
31330    #[doc = "Vibration levels on X-axis"]
31331    pub vibration_x: f32,
31332    #[doc = "Vibration levels on Y-axis"]
31333    pub vibration_y: f32,
31334    #[doc = "Vibration levels on Z-axis"]
31335    pub vibration_z: f32,
31336    #[doc = "first accelerometer clipping count"]
31337    pub clipping_0: u32,
31338    #[doc = "second accelerometer clipping count"]
31339    pub clipping_1: u32,
31340    #[doc = "third accelerometer clipping count"]
31341    pub clipping_2: u32,
31342}
31343impl VIBRATION_DATA {
31344    pub const ENCODED_LEN: usize = 32usize;
31345    pub const DEFAULT: Self = Self {
31346        time_usec: 0_u64,
31347        vibration_x: 0.0_f32,
31348        vibration_y: 0.0_f32,
31349        vibration_z: 0.0_f32,
31350        clipping_0: 0_u32,
31351        clipping_1: 0_u32,
31352        clipping_2: 0_u32,
31353    };
31354    #[cfg(feature = "arbitrary")]
31355    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31356        use arbitrary::{Arbitrary, Unstructured};
31357        let mut buf = [0u8; 1024];
31358        rng.fill_bytes(&mut buf);
31359        let mut unstructured = Unstructured::new(&buf);
31360        Self::arbitrary(&mut unstructured).unwrap_or_default()
31361    }
31362}
31363impl Default for VIBRATION_DATA {
31364    fn default() -> Self {
31365        Self::DEFAULT.clone()
31366    }
31367}
31368impl MessageData for VIBRATION_DATA {
31369    type Message = MavMessage;
31370    const ID: u32 = 241u32;
31371    const NAME: &'static str = "VIBRATION";
31372    const EXTRA_CRC: u8 = 90u8;
31373    const ENCODED_LEN: usize = 32usize;
31374    fn deser(
31375        _version: MavlinkVersion,
31376        __input: &[u8],
31377    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31378        let avail_len = __input.len();
31379        let mut payload_buf = [0; Self::ENCODED_LEN];
31380        let mut buf = if avail_len < Self::ENCODED_LEN {
31381            payload_buf[0..avail_len].copy_from_slice(__input);
31382            Bytes::new(&payload_buf)
31383        } else {
31384            Bytes::new(__input)
31385        };
31386        let mut __struct = Self::default();
31387        __struct.time_usec = buf.get_u64_le();
31388        __struct.vibration_x = buf.get_f32_le();
31389        __struct.vibration_y = buf.get_f32_le();
31390        __struct.vibration_z = buf.get_f32_le();
31391        __struct.clipping_0 = buf.get_u32_le();
31392        __struct.clipping_1 = buf.get_u32_le();
31393        __struct.clipping_2 = buf.get_u32_le();
31394        Ok(__struct)
31395    }
31396    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31397        let mut __tmp = BytesMut::new(bytes);
31398        #[allow(clippy::absurd_extreme_comparisons)]
31399        #[allow(unused_comparisons)]
31400        if __tmp.remaining() < Self::ENCODED_LEN {
31401            panic!(
31402                "buffer is too small (need {} bytes, but got {})",
31403                Self::ENCODED_LEN,
31404                __tmp.remaining(),
31405            )
31406        }
31407        __tmp.put_u64_le(self.time_usec);
31408        __tmp.put_f32_le(self.vibration_x);
31409        __tmp.put_f32_le(self.vibration_y);
31410        __tmp.put_f32_le(self.vibration_z);
31411        __tmp.put_u32_le(self.clipping_0);
31412        __tmp.put_u32_le(self.clipping_1);
31413        __tmp.put_u32_le(self.clipping_2);
31414        if matches!(version, MavlinkVersion::V2) {
31415            let len = __tmp.len();
31416            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31417        } else {
31418            __tmp.len()
31419        }
31420    }
31421}
31422#[doc = "Global position estimate from a Vicon motion system source."]
31423#[doc = ""]
31424#[doc = "ID: 104"]
31425#[derive(Debug, Clone, PartialEq)]
31426#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31427#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31428#[cfg_attr(feature = "ts", derive(TS))]
31429#[cfg_attr(feature = "ts", ts(export))]
31430pub struct VICON_POSITION_ESTIMATE_DATA {
31431    #[doc = "Timestamp (UNIX time or time since system boot)"]
31432    pub usec: u64,
31433    #[doc = "Global X position"]
31434    pub x: f32,
31435    #[doc = "Global Y position"]
31436    pub y: f32,
31437    #[doc = "Global Z position"]
31438    pub z: f32,
31439    #[doc = "Roll angle"]
31440    pub roll: f32,
31441    #[doc = "Pitch angle"]
31442    pub pitch: f32,
31443    #[doc = "Yaw angle"]
31444    pub yaw: f32,
31445    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31446    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31447    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31448    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31449    pub covariance: [f32; 21],
31450}
31451impl VICON_POSITION_ESTIMATE_DATA {
31452    pub const ENCODED_LEN: usize = 116usize;
31453    pub const DEFAULT: Self = Self {
31454        usec: 0_u64,
31455        x: 0.0_f32,
31456        y: 0.0_f32,
31457        z: 0.0_f32,
31458        roll: 0.0_f32,
31459        pitch: 0.0_f32,
31460        yaw: 0.0_f32,
31461        covariance: [0.0_f32; 21usize],
31462    };
31463    #[cfg(feature = "arbitrary")]
31464    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31465        use arbitrary::{Arbitrary, Unstructured};
31466        let mut buf = [0u8; 1024];
31467        rng.fill_bytes(&mut buf);
31468        let mut unstructured = Unstructured::new(&buf);
31469        Self::arbitrary(&mut unstructured).unwrap_or_default()
31470    }
31471}
31472impl Default for VICON_POSITION_ESTIMATE_DATA {
31473    fn default() -> Self {
31474        Self::DEFAULT.clone()
31475    }
31476}
31477impl MessageData for VICON_POSITION_ESTIMATE_DATA {
31478    type Message = MavMessage;
31479    const ID: u32 = 104u32;
31480    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
31481    const EXTRA_CRC: u8 = 56u8;
31482    const ENCODED_LEN: usize = 116usize;
31483    fn deser(
31484        _version: MavlinkVersion,
31485        __input: &[u8],
31486    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31487        let avail_len = __input.len();
31488        let mut payload_buf = [0; Self::ENCODED_LEN];
31489        let mut buf = if avail_len < Self::ENCODED_LEN {
31490            payload_buf[0..avail_len].copy_from_slice(__input);
31491            Bytes::new(&payload_buf)
31492        } else {
31493            Bytes::new(__input)
31494        };
31495        let mut __struct = Self::default();
31496        __struct.usec = buf.get_u64_le();
31497        __struct.x = buf.get_f32_le();
31498        __struct.y = buf.get_f32_le();
31499        __struct.z = buf.get_f32_le();
31500        __struct.roll = buf.get_f32_le();
31501        __struct.pitch = buf.get_f32_le();
31502        __struct.yaw = buf.get_f32_le();
31503        for v in &mut __struct.covariance {
31504            let val = buf.get_f32_le();
31505            *v = val;
31506        }
31507        Ok(__struct)
31508    }
31509    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31510        let mut __tmp = BytesMut::new(bytes);
31511        #[allow(clippy::absurd_extreme_comparisons)]
31512        #[allow(unused_comparisons)]
31513        if __tmp.remaining() < Self::ENCODED_LEN {
31514            panic!(
31515                "buffer is too small (need {} bytes, but got {})",
31516                Self::ENCODED_LEN,
31517                __tmp.remaining(),
31518            )
31519        }
31520        __tmp.put_u64_le(self.usec);
31521        __tmp.put_f32_le(self.x);
31522        __tmp.put_f32_le(self.y);
31523        __tmp.put_f32_le(self.z);
31524        __tmp.put_f32_le(self.roll);
31525        __tmp.put_f32_le(self.pitch);
31526        __tmp.put_f32_le(self.yaw);
31527        if matches!(version, MavlinkVersion::V2) {
31528            for val in &self.covariance {
31529                __tmp.put_f32_le(*val);
31530            }
31531            let len = __tmp.len();
31532            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31533        } else {
31534            __tmp.len()
31535        }
31536    }
31537}
31538#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
31539#[doc = ""]
31540#[doc = "ID: 269"]
31541#[derive(Debug, Clone, PartialEq)]
31542#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31543#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31544#[cfg_attr(feature = "ts", derive(TS))]
31545#[cfg_attr(feature = "ts", ts(export))]
31546pub struct VIDEO_STREAM_INFORMATION_DATA {
31547    #[doc = "Frame rate."]
31548    pub framerate: f32,
31549    #[doc = "Bit rate."]
31550    pub bitrate: u32,
31551    #[doc = "Bitmap of stream status flags."]
31552    pub flags: VideoStreamStatusFlags,
31553    #[doc = "Horizontal resolution."]
31554    pub resolution_h: u16,
31555    #[doc = "Vertical resolution."]
31556    pub resolution_v: u16,
31557    #[doc = "Video image rotation clockwise."]
31558    pub rotation: u16,
31559    #[doc = "Horizontal Field of view."]
31560    pub hfov: u16,
31561    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31562    pub stream_id: u8,
31563    #[doc = "Number of streams available."]
31564    pub count: u8,
31565    #[doc = "Type of stream."]
31566    pub mavtype: VideoStreamType,
31567    #[doc = "Stream name."]
31568    #[cfg_attr(feature = "ts", ts(type = "string"))]
31569    pub name: CharArray<32>,
31570    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
31571    #[cfg_attr(feature = "ts", ts(type = "string"))]
31572    pub uri: CharArray<160>,
31573    #[doc = "Encoding of stream."]
31574    #[cfg_attr(feature = "serde", serde(default))]
31575    pub encoding: VideoStreamEncoding,
31576    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31577    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31578    pub camera_device_id: u8,
31579}
31580impl VIDEO_STREAM_INFORMATION_DATA {
31581    pub const ENCODED_LEN: usize = 215usize;
31582    pub const DEFAULT: Self = Self {
31583        framerate: 0.0_f32,
31584        bitrate: 0_u32,
31585        flags: VideoStreamStatusFlags::DEFAULT,
31586        resolution_h: 0_u16,
31587        resolution_v: 0_u16,
31588        rotation: 0_u16,
31589        hfov: 0_u16,
31590        stream_id: 0_u8,
31591        count: 0_u8,
31592        mavtype: VideoStreamType::DEFAULT,
31593        name: CharArray::new([0_u8; 32usize]),
31594        uri: CharArray::new([0_u8; 160usize]),
31595        encoding: VideoStreamEncoding::DEFAULT,
31596        camera_device_id: 0_u8,
31597    };
31598    #[cfg(feature = "arbitrary")]
31599    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31600        use arbitrary::{Arbitrary, Unstructured};
31601        let mut buf = [0u8; 1024];
31602        rng.fill_bytes(&mut buf);
31603        let mut unstructured = Unstructured::new(&buf);
31604        Self::arbitrary(&mut unstructured).unwrap_or_default()
31605    }
31606}
31607impl Default for VIDEO_STREAM_INFORMATION_DATA {
31608    fn default() -> Self {
31609        Self::DEFAULT.clone()
31610    }
31611}
31612impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
31613    type Message = MavMessage;
31614    const ID: u32 = 269u32;
31615    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
31616    const EXTRA_CRC: u8 = 109u8;
31617    const ENCODED_LEN: usize = 215usize;
31618    fn deser(
31619        _version: MavlinkVersion,
31620        __input: &[u8],
31621    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31622        let avail_len = __input.len();
31623        let mut payload_buf = [0; Self::ENCODED_LEN];
31624        let mut buf = if avail_len < Self::ENCODED_LEN {
31625            payload_buf[0..avail_len].copy_from_slice(__input);
31626            Bytes::new(&payload_buf)
31627        } else {
31628            Bytes::new(__input)
31629        };
31630        let mut __struct = Self::default();
31631        __struct.framerate = buf.get_f32_le();
31632        __struct.bitrate = buf.get_u32_le();
31633        let tmp = buf.get_u16_le();
31634        __struct.flags = VideoStreamStatusFlags::from_bits(
31635            tmp & VideoStreamStatusFlags::all().bits(),
31636        )
31637        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31638            flag_type: "VideoStreamStatusFlags",
31639            value: tmp as u32,
31640        })?;
31641        __struct.resolution_h = buf.get_u16_le();
31642        __struct.resolution_v = buf.get_u16_le();
31643        __struct.rotation = buf.get_u16_le();
31644        __struct.hfov = buf.get_u16_le();
31645        __struct.stream_id = buf.get_u8();
31646        __struct.count = buf.get_u8();
31647        let tmp = buf.get_u8();
31648        __struct.mavtype =
31649            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31650                enum_type: "VideoStreamType",
31651                value: tmp as u32,
31652            })?;
31653        let mut tmp = [0_u8; 32usize];
31654        for v in &mut tmp {
31655            *v = buf.get_u8();
31656        }
31657        __struct.name = CharArray::new(tmp);
31658        let mut tmp = [0_u8; 160usize];
31659        for v in &mut tmp {
31660            *v = buf.get_u8();
31661        }
31662        __struct.uri = CharArray::new(tmp);
31663        let tmp = buf.get_u8();
31664        __struct.encoding =
31665            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31666                enum_type: "VideoStreamEncoding",
31667                value: tmp as u32,
31668            })?;
31669        __struct.camera_device_id = buf.get_u8();
31670        Ok(__struct)
31671    }
31672    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31673        let mut __tmp = BytesMut::new(bytes);
31674        #[allow(clippy::absurd_extreme_comparisons)]
31675        #[allow(unused_comparisons)]
31676        if __tmp.remaining() < Self::ENCODED_LEN {
31677            panic!(
31678                "buffer is too small (need {} bytes, but got {})",
31679                Self::ENCODED_LEN,
31680                __tmp.remaining(),
31681            )
31682        }
31683        __tmp.put_f32_le(self.framerate);
31684        __tmp.put_u32_le(self.bitrate);
31685        __tmp.put_u16_le(self.flags.bits());
31686        __tmp.put_u16_le(self.resolution_h);
31687        __tmp.put_u16_le(self.resolution_v);
31688        __tmp.put_u16_le(self.rotation);
31689        __tmp.put_u16_le(self.hfov);
31690        __tmp.put_u8(self.stream_id);
31691        __tmp.put_u8(self.count);
31692        __tmp.put_u8(self.mavtype as u8);
31693        for val in &self.name {
31694            __tmp.put_u8(*val);
31695        }
31696        for val in &self.uri {
31697            __tmp.put_u8(*val);
31698        }
31699        if matches!(version, MavlinkVersion::V2) {
31700            __tmp.put_u8(self.encoding as u8);
31701            __tmp.put_u8(self.camera_device_id);
31702            let len = __tmp.len();
31703            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31704        } else {
31705            __tmp.len()
31706        }
31707    }
31708}
31709#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
31710#[doc = ""]
31711#[doc = "ID: 270"]
31712#[derive(Debug, Clone, PartialEq)]
31713#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31714#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31715#[cfg_attr(feature = "ts", derive(TS))]
31716#[cfg_attr(feature = "ts", ts(export))]
31717pub struct VIDEO_STREAM_STATUS_DATA {
31718    #[doc = "Frame rate"]
31719    pub framerate: f32,
31720    #[doc = "Bit rate"]
31721    pub bitrate: u32,
31722    #[doc = "Bitmap of stream status flags"]
31723    pub flags: VideoStreamStatusFlags,
31724    #[doc = "Horizontal resolution"]
31725    pub resolution_h: u16,
31726    #[doc = "Vertical resolution"]
31727    pub resolution_v: u16,
31728    #[doc = "Video image rotation clockwise"]
31729    pub rotation: u16,
31730    #[doc = "Horizontal Field of view"]
31731    pub hfov: u16,
31732    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31733    pub stream_id: u8,
31734    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31735    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31736    pub camera_device_id: u8,
31737}
31738impl VIDEO_STREAM_STATUS_DATA {
31739    pub const ENCODED_LEN: usize = 20usize;
31740    pub const DEFAULT: Self = Self {
31741        framerate: 0.0_f32,
31742        bitrate: 0_u32,
31743        flags: VideoStreamStatusFlags::DEFAULT,
31744        resolution_h: 0_u16,
31745        resolution_v: 0_u16,
31746        rotation: 0_u16,
31747        hfov: 0_u16,
31748        stream_id: 0_u8,
31749        camera_device_id: 0_u8,
31750    };
31751    #[cfg(feature = "arbitrary")]
31752    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31753        use arbitrary::{Arbitrary, Unstructured};
31754        let mut buf = [0u8; 1024];
31755        rng.fill_bytes(&mut buf);
31756        let mut unstructured = Unstructured::new(&buf);
31757        Self::arbitrary(&mut unstructured).unwrap_or_default()
31758    }
31759}
31760impl Default for VIDEO_STREAM_STATUS_DATA {
31761    fn default() -> Self {
31762        Self::DEFAULT.clone()
31763    }
31764}
31765impl MessageData for VIDEO_STREAM_STATUS_DATA {
31766    type Message = MavMessage;
31767    const ID: u32 = 270u32;
31768    const NAME: &'static str = "VIDEO_STREAM_STATUS";
31769    const EXTRA_CRC: u8 = 59u8;
31770    const ENCODED_LEN: usize = 20usize;
31771    fn deser(
31772        _version: MavlinkVersion,
31773        __input: &[u8],
31774    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31775        let avail_len = __input.len();
31776        let mut payload_buf = [0; Self::ENCODED_LEN];
31777        let mut buf = if avail_len < Self::ENCODED_LEN {
31778            payload_buf[0..avail_len].copy_from_slice(__input);
31779            Bytes::new(&payload_buf)
31780        } else {
31781            Bytes::new(__input)
31782        };
31783        let mut __struct = Self::default();
31784        __struct.framerate = buf.get_f32_le();
31785        __struct.bitrate = buf.get_u32_le();
31786        let tmp = buf.get_u16_le();
31787        __struct.flags = VideoStreamStatusFlags::from_bits(
31788            tmp & VideoStreamStatusFlags::all().bits(),
31789        )
31790        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31791            flag_type: "VideoStreamStatusFlags",
31792            value: tmp as u32,
31793        })?;
31794        __struct.resolution_h = buf.get_u16_le();
31795        __struct.resolution_v = buf.get_u16_le();
31796        __struct.rotation = buf.get_u16_le();
31797        __struct.hfov = buf.get_u16_le();
31798        __struct.stream_id = buf.get_u8();
31799        __struct.camera_device_id = buf.get_u8();
31800        Ok(__struct)
31801    }
31802    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31803        let mut __tmp = BytesMut::new(bytes);
31804        #[allow(clippy::absurd_extreme_comparisons)]
31805        #[allow(unused_comparisons)]
31806        if __tmp.remaining() < Self::ENCODED_LEN {
31807            panic!(
31808                "buffer is too small (need {} bytes, but got {})",
31809                Self::ENCODED_LEN,
31810                __tmp.remaining(),
31811            )
31812        }
31813        __tmp.put_f32_le(self.framerate);
31814        __tmp.put_u32_le(self.bitrate);
31815        __tmp.put_u16_le(self.flags.bits());
31816        __tmp.put_u16_le(self.resolution_h);
31817        __tmp.put_u16_le(self.resolution_v);
31818        __tmp.put_u16_le(self.rotation);
31819        __tmp.put_u16_le(self.hfov);
31820        __tmp.put_u8(self.stream_id);
31821        if matches!(version, MavlinkVersion::V2) {
31822            __tmp.put_u8(self.camera_device_id);
31823            let len = __tmp.len();
31824            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31825        } else {
31826            __tmp.len()
31827        }
31828    }
31829}
31830#[doc = "Local position/attitude estimate from a vision source."]
31831#[doc = ""]
31832#[doc = "ID: 102"]
31833#[derive(Debug, Clone, PartialEq)]
31834#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31835#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31836#[cfg_attr(feature = "ts", derive(TS))]
31837#[cfg_attr(feature = "ts", ts(export))]
31838pub struct VISION_POSITION_ESTIMATE_DATA {
31839    #[doc = "Timestamp (UNIX time or time since system boot)"]
31840    pub usec: u64,
31841    #[doc = "Local X position"]
31842    pub x: f32,
31843    #[doc = "Local Y position"]
31844    pub y: f32,
31845    #[doc = "Local Z position"]
31846    pub z: f32,
31847    #[doc = "Roll angle"]
31848    pub roll: f32,
31849    #[doc = "Pitch angle"]
31850    pub pitch: f32,
31851    #[doc = "Yaw angle"]
31852    pub yaw: f32,
31853    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31854    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31855    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31856    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31857    pub covariance: [f32; 21],
31858    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31859    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31860    pub reset_counter: u8,
31861}
31862impl VISION_POSITION_ESTIMATE_DATA {
31863    pub const ENCODED_LEN: usize = 117usize;
31864    pub const DEFAULT: Self = Self {
31865        usec: 0_u64,
31866        x: 0.0_f32,
31867        y: 0.0_f32,
31868        z: 0.0_f32,
31869        roll: 0.0_f32,
31870        pitch: 0.0_f32,
31871        yaw: 0.0_f32,
31872        covariance: [0.0_f32; 21usize],
31873        reset_counter: 0_u8,
31874    };
31875    #[cfg(feature = "arbitrary")]
31876    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31877        use arbitrary::{Arbitrary, Unstructured};
31878        let mut buf = [0u8; 1024];
31879        rng.fill_bytes(&mut buf);
31880        let mut unstructured = Unstructured::new(&buf);
31881        Self::arbitrary(&mut unstructured).unwrap_or_default()
31882    }
31883}
31884impl Default for VISION_POSITION_ESTIMATE_DATA {
31885    fn default() -> Self {
31886        Self::DEFAULT.clone()
31887    }
31888}
31889impl MessageData for VISION_POSITION_ESTIMATE_DATA {
31890    type Message = MavMessage;
31891    const ID: u32 = 102u32;
31892    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
31893    const EXTRA_CRC: u8 = 158u8;
31894    const ENCODED_LEN: usize = 117usize;
31895    fn deser(
31896        _version: MavlinkVersion,
31897        __input: &[u8],
31898    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31899        let avail_len = __input.len();
31900        let mut payload_buf = [0; Self::ENCODED_LEN];
31901        let mut buf = if avail_len < Self::ENCODED_LEN {
31902            payload_buf[0..avail_len].copy_from_slice(__input);
31903            Bytes::new(&payload_buf)
31904        } else {
31905            Bytes::new(__input)
31906        };
31907        let mut __struct = Self::default();
31908        __struct.usec = buf.get_u64_le();
31909        __struct.x = buf.get_f32_le();
31910        __struct.y = buf.get_f32_le();
31911        __struct.z = buf.get_f32_le();
31912        __struct.roll = buf.get_f32_le();
31913        __struct.pitch = buf.get_f32_le();
31914        __struct.yaw = buf.get_f32_le();
31915        for v in &mut __struct.covariance {
31916            let val = buf.get_f32_le();
31917            *v = val;
31918        }
31919        __struct.reset_counter = buf.get_u8();
31920        Ok(__struct)
31921    }
31922    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31923        let mut __tmp = BytesMut::new(bytes);
31924        #[allow(clippy::absurd_extreme_comparisons)]
31925        #[allow(unused_comparisons)]
31926        if __tmp.remaining() < Self::ENCODED_LEN {
31927            panic!(
31928                "buffer is too small (need {} bytes, but got {})",
31929                Self::ENCODED_LEN,
31930                __tmp.remaining(),
31931            )
31932        }
31933        __tmp.put_u64_le(self.usec);
31934        __tmp.put_f32_le(self.x);
31935        __tmp.put_f32_le(self.y);
31936        __tmp.put_f32_le(self.z);
31937        __tmp.put_f32_le(self.roll);
31938        __tmp.put_f32_le(self.pitch);
31939        __tmp.put_f32_le(self.yaw);
31940        if matches!(version, MavlinkVersion::V2) {
31941            for val in &self.covariance {
31942                __tmp.put_f32_le(*val);
31943            }
31944            __tmp.put_u8(self.reset_counter);
31945            let len = __tmp.len();
31946            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31947        } else {
31948            __tmp.len()
31949        }
31950    }
31951}
31952#[doc = "Speed estimate from a vision source."]
31953#[doc = ""]
31954#[doc = "ID: 103"]
31955#[derive(Debug, Clone, PartialEq)]
31956#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31957#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31958#[cfg_attr(feature = "ts", derive(TS))]
31959#[cfg_attr(feature = "ts", ts(export))]
31960pub struct VISION_SPEED_ESTIMATE_DATA {
31961    #[doc = "Timestamp (UNIX time or time since system boot)"]
31962    pub usec: u64,
31963    #[doc = "Global X speed"]
31964    pub x: f32,
31965    #[doc = "Global Y speed"]
31966    pub y: f32,
31967    #[doc = "Global Z speed"]
31968    pub z: f32,
31969    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
31970    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31971    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31972    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31973    pub covariance: [f32; 9],
31974    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31975    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31976    pub reset_counter: u8,
31977}
31978impl VISION_SPEED_ESTIMATE_DATA {
31979    pub const ENCODED_LEN: usize = 57usize;
31980    pub const DEFAULT: Self = Self {
31981        usec: 0_u64,
31982        x: 0.0_f32,
31983        y: 0.0_f32,
31984        z: 0.0_f32,
31985        covariance: [0.0_f32; 9usize],
31986        reset_counter: 0_u8,
31987    };
31988    #[cfg(feature = "arbitrary")]
31989    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31990        use arbitrary::{Arbitrary, Unstructured};
31991        let mut buf = [0u8; 1024];
31992        rng.fill_bytes(&mut buf);
31993        let mut unstructured = Unstructured::new(&buf);
31994        Self::arbitrary(&mut unstructured).unwrap_or_default()
31995    }
31996}
31997impl Default for VISION_SPEED_ESTIMATE_DATA {
31998    fn default() -> Self {
31999        Self::DEFAULT.clone()
32000    }
32001}
32002impl MessageData for VISION_SPEED_ESTIMATE_DATA {
32003    type Message = MavMessage;
32004    const ID: u32 = 103u32;
32005    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
32006    const EXTRA_CRC: u8 = 208u8;
32007    const ENCODED_LEN: usize = 57usize;
32008    fn deser(
32009        _version: MavlinkVersion,
32010        __input: &[u8],
32011    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32012        let avail_len = __input.len();
32013        let mut payload_buf = [0; Self::ENCODED_LEN];
32014        let mut buf = if avail_len < Self::ENCODED_LEN {
32015            payload_buf[0..avail_len].copy_from_slice(__input);
32016            Bytes::new(&payload_buf)
32017        } else {
32018            Bytes::new(__input)
32019        };
32020        let mut __struct = Self::default();
32021        __struct.usec = buf.get_u64_le();
32022        __struct.x = buf.get_f32_le();
32023        __struct.y = buf.get_f32_le();
32024        __struct.z = buf.get_f32_le();
32025        for v in &mut __struct.covariance {
32026            let val = buf.get_f32_le();
32027            *v = val;
32028        }
32029        __struct.reset_counter = buf.get_u8();
32030        Ok(__struct)
32031    }
32032    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32033        let mut __tmp = BytesMut::new(bytes);
32034        #[allow(clippy::absurd_extreme_comparisons)]
32035        #[allow(unused_comparisons)]
32036        if __tmp.remaining() < Self::ENCODED_LEN {
32037            panic!(
32038                "buffer is too small (need {} bytes, but got {})",
32039                Self::ENCODED_LEN,
32040                __tmp.remaining(),
32041            )
32042        }
32043        __tmp.put_u64_le(self.usec);
32044        __tmp.put_f32_le(self.x);
32045        __tmp.put_f32_le(self.y);
32046        __tmp.put_f32_le(self.z);
32047        if matches!(version, MavlinkVersion::V2) {
32048            for val in &self.covariance {
32049                __tmp.put_f32_le(*val);
32050            }
32051            __tmp.put_u8(self.reset_counter);
32052            let len = __tmp.len();
32053            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32054        } else {
32055            __tmp.len()
32056        }
32057    }
32058}
32059#[doc = "Cumulative distance traveled for each reported wheel."]
32060#[doc = ""]
32061#[doc = "ID: 9000"]
32062#[derive(Debug, Clone, PartialEq)]
32063#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32064#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32065#[cfg_attr(feature = "ts", derive(TS))]
32066#[cfg_attr(feature = "ts", ts(export))]
32067pub struct WHEEL_DISTANCE_DATA {
32068    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32069    pub time_usec: u64,
32070    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
32071    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32072    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32073    pub distance: [f64; 16],
32074    #[doc = "Number of wheels reported."]
32075    pub count: u8,
32076}
32077impl WHEEL_DISTANCE_DATA {
32078    pub const ENCODED_LEN: usize = 137usize;
32079    pub const DEFAULT: Self = Self {
32080        time_usec: 0_u64,
32081        distance: [0.0_f64; 16usize],
32082        count: 0_u8,
32083    };
32084    #[cfg(feature = "arbitrary")]
32085    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32086        use arbitrary::{Arbitrary, Unstructured};
32087        let mut buf = [0u8; 1024];
32088        rng.fill_bytes(&mut buf);
32089        let mut unstructured = Unstructured::new(&buf);
32090        Self::arbitrary(&mut unstructured).unwrap_or_default()
32091    }
32092}
32093impl Default for WHEEL_DISTANCE_DATA {
32094    fn default() -> Self {
32095        Self::DEFAULT.clone()
32096    }
32097}
32098impl MessageData for WHEEL_DISTANCE_DATA {
32099    type Message = MavMessage;
32100    const ID: u32 = 9000u32;
32101    const NAME: &'static str = "WHEEL_DISTANCE";
32102    const EXTRA_CRC: u8 = 113u8;
32103    const ENCODED_LEN: usize = 137usize;
32104    fn deser(
32105        _version: MavlinkVersion,
32106        __input: &[u8],
32107    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32108        let avail_len = __input.len();
32109        let mut payload_buf = [0; Self::ENCODED_LEN];
32110        let mut buf = if avail_len < Self::ENCODED_LEN {
32111            payload_buf[0..avail_len].copy_from_slice(__input);
32112            Bytes::new(&payload_buf)
32113        } else {
32114            Bytes::new(__input)
32115        };
32116        let mut __struct = Self::default();
32117        __struct.time_usec = buf.get_u64_le();
32118        for v in &mut __struct.distance {
32119            let val = buf.get_f64_le();
32120            *v = val;
32121        }
32122        __struct.count = buf.get_u8();
32123        Ok(__struct)
32124    }
32125    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32126        let mut __tmp = BytesMut::new(bytes);
32127        #[allow(clippy::absurd_extreme_comparisons)]
32128        #[allow(unused_comparisons)]
32129        if __tmp.remaining() < Self::ENCODED_LEN {
32130            panic!(
32131                "buffer is too small (need {} bytes, but got {})",
32132                Self::ENCODED_LEN,
32133                __tmp.remaining(),
32134            )
32135        }
32136        __tmp.put_u64_le(self.time_usec);
32137        for val in &self.distance {
32138            __tmp.put_f64_le(*val);
32139        }
32140        __tmp.put_u8(self.count);
32141        if matches!(version, MavlinkVersion::V2) {
32142            let len = __tmp.len();
32143            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32144        } else {
32145            __tmp.len()
32146        }
32147    }
32148}
32149#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32150#[doc = ""]
32151#[doc = "ID: 299"]
32152#[derive(Debug, Clone, PartialEq)]
32153#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32154#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32155#[cfg_attr(feature = "ts", derive(TS))]
32156#[cfg_attr(feature = "ts", ts(export))]
32157pub struct WIFI_CONFIG_AP_DATA {
32158    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
32159    #[cfg_attr(feature = "ts", ts(type = "string"))]
32160    pub ssid: CharArray<32>,
32161    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
32162    #[cfg_attr(feature = "ts", ts(type = "string"))]
32163    pub password: CharArray<64>,
32164    #[doc = "WiFi Mode."]
32165    #[cfg_attr(feature = "serde", serde(default))]
32166    pub mode: WifiConfigApMode,
32167    #[doc = "Message acceptance response (sent back to GS)."]
32168    #[cfg_attr(feature = "serde", serde(default))]
32169    pub response: WifiConfigApResponse,
32170}
32171impl WIFI_CONFIG_AP_DATA {
32172    pub const ENCODED_LEN: usize = 98usize;
32173    pub const DEFAULT: Self = Self {
32174        ssid: CharArray::new([0_u8; 32usize]),
32175        password: CharArray::new([0_u8; 64usize]),
32176        mode: WifiConfigApMode::DEFAULT,
32177        response: WifiConfigApResponse::DEFAULT,
32178    };
32179    #[cfg(feature = "arbitrary")]
32180    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32181        use arbitrary::{Arbitrary, Unstructured};
32182        let mut buf = [0u8; 1024];
32183        rng.fill_bytes(&mut buf);
32184        let mut unstructured = Unstructured::new(&buf);
32185        Self::arbitrary(&mut unstructured).unwrap_or_default()
32186    }
32187}
32188impl Default for WIFI_CONFIG_AP_DATA {
32189    fn default() -> Self {
32190        Self::DEFAULT.clone()
32191    }
32192}
32193impl MessageData for WIFI_CONFIG_AP_DATA {
32194    type Message = MavMessage;
32195    const ID: u32 = 299u32;
32196    const NAME: &'static str = "WIFI_CONFIG_AP";
32197    const EXTRA_CRC: u8 = 19u8;
32198    const ENCODED_LEN: usize = 98usize;
32199    fn deser(
32200        _version: MavlinkVersion,
32201        __input: &[u8],
32202    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32203        let avail_len = __input.len();
32204        let mut payload_buf = [0; Self::ENCODED_LEN];
32205        let mut buf = if avail_len < Self::ENCODED_LEN {
32206            payload_buf[0..avail_len].copy_from_slice(__input);
32207            Bytes::new(&payload_buf)
32208        } else {
32209            Bytes::new(__input)
32210        };
32211        let mut __struct = Self::default();
32212        let mut tmp = [0_u8; 32usize];
32213        for v in &mut tmp {
32214            *v = buf.get_u8();
32215        }
32216        __struct.ssid = CharArray::new(tmp);
32217        let mut tmp = [0_u8; 64usize];
32218        for v in &mut tmp {
32219            *v = buf.get_u8();
32220        }
32221        __struct.password = CharArray::new(tmp);
32222        let tmp = buf.get_i8();
32223        __struct.mode =
32224            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32225                enum_type: "WifiConfigApMode",
32226                value: tmp as u32,
32227            })?;
32228        let tmp = buf.get_i8();
32229        __struct.response =
32230            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32231                enum_type: "WifiConfigApResponse",
32232                value: tmp as u32,
32233            })?;
32234        Ok(__struct)
32235    }
32236    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32237        let mut __tmp = BytesMut::new(bytes);
32238        #[allow(clippy::absurd_extreme_comparisons)]
32239        #[allow(unused_comparisons)]
32240        if __tmp.remaining() < Self::ENCODED_LEN {
32241            panic!(
32242                "buffer is too small (need {} bytes, but got {})",
32243                Self::ENCODED_LEN,
32244                __tmp.remaining(),
32245            )
32246        }
32247        for val in &self.ssid {
32248            __tmp.put_u8(*val);
32249        }
32250        for val in &self.password {
32251            __tmp.put_u8(*val);
32252        }
32253        if matches!(version, MavlinkVersion::V2) {
32254            __tmp.put_i8(self.mode as i8);
32255            __tmp.put_i8(self.response as i8);
32256            let len = __tmp.len();
32257            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32258        } else {
32259            __tmp.len()
32260        }
32261    }
32262}
32263#[doc = "Winch status."]
32264#[doc = ""]
32265#[doc = "ID: 9005"]
32266#[derive(Debug, Clone, PartialEq)]
32267#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32268#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32269#[cfg_attr(feature = "ts", derive(TS))]
32270#[cfg_attr(feature = "ts", ts(export))]
32271pub struct WINCH_STATUS_DATA {
32272    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32273    pub time_usec: u64,
32274    #[doc = "Length of line released. NaN if unknown"]
32275    pub line_length: f32,
32276    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
32277    pub speed: f32,
32278    #[doc = "Tension on the line. NaN if unknown"]
32279    pub tension: f32,
32280    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
32281    pub voltage: f32,
32282    #[doc = "Current draw from the winch. NaN if unknown"]
32283    pub current: f32,
32284    #[doc = "Status flags"]
32285    pub status: MavWinchStatusFlag,
32286    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
32287    pub temperature: i16,
32288}
32289impl WINCH_STATUS_DATA {
32290    pub const ENCODED_LEN: usize = 34usize;
32291    pub const DEFAULT: Self = Self {
32292        time_usec: 0_u64,
32293        line_length: 0.0_f32,
32294        speed: 0.0_f32,
32295        tension: 0.0_f32,
32296        voltage: 0.0_f32,
32297        current: 0.0_f32,
32298        status: MavWinchStatusFlag::DEFAULT,
32299        temperature: 0_i16,
32300    };
32301    #[cfg(feature = "arbitrary")]
32302    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32303        use arbitrary::{Arbitrary, Unstructured};
32304        let mut buf = [0u8; 1024];
32305        rng.fill_bytes(&mut buf);
32306        let mut unstructured = Unstructured::new(&buf);
32307        Self::arbitrary(&mut unstructured).unwrap_or_default()
32308    }
32309}
32310impl Default for WINCH_STATUS_DATA {
32311    fn default() -> Self {
32312        Self::DEFAULT.clone()
32313    }
32314}
32315impl MessageData for WINCH_STATUS_DATA {
32316    type Message = MavMessage;
32317    const ID: u32 = 9005u32;
32318    const NAME: &'static str = "WINCH_STATUS";
32319    const EXTRA_CRC: u8 = 117u8;
32320    const ENCODED_LEN: usize = 34usize;
32321    fn deser(
32322        _version: MavlinkVersion,
32323        __input: &[u8],
32324    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32325        let avail_len = __input.len();
32326        let mut payload_buf = [0; Self::ENCODED_LEN];
32327        let mut buf = if avail_len < Self::ENCODED_LEN {
32328            payload_buf[0..avail_len].copy_from_slice(__input);
32329            Bytes::new(&payload_buf)
32330        } else {
32331            Bytes::new(__input)
32332        };
32333        let mut __struct = Self::default();
32334        __struct.time_usec = buf.get_u64_le();
32335        __struct.line_length = buf.get_f32_le();
32336        __struct.speed = buf.get_f32_le();
32337        __struct.tension = buf.get_f32_le();
32338        __struct.voltage = buf.get_f32_le();
32339        __struct.current = buf.get_f32_le();
32340        let tmp = buf.get_u32_le();
32341        __struct.status = MavWinchStatusFlag::from_bits(tmp & MavWinchStatusFlag::all().bits())
32342            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32343                flag_type: "MavWinchStatusFlag",
32344                value: tmp as u32,
32345            })?;
32346        __struct.temperature = buf.get_i16_le();
32347        Ok(__struct)
32348    }
32349    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32350        let mut __tmp = BytesMut::new(bytes);
32351        #[allow(clippy::absurd_extreme_comparisons)]
32352        #[allow(unused_comparisons)]
32353        if __tmp.remaining() < Self::ENCODED_LEN {
32354            panic!(
32355                "buffer is too small (need {} bytes, but got {})",
32356                Self::ENCODED_LEN,
32357                __tmp.remaining(),
32358            )
32359        }
32360        __tmp.put_u64_le(self.time_usec);
32361        __tmp.put_f32_le(self.line_length);
32362        __tmp.put_f32_le(self.speed);
32363        __tmp.put_f32_le(self.tension);
32364        __tmp.put_f32_le(self.voltage);
32365        __tmp.put_f32_le(self.current);
32366        __tmp.put_u32_le(self.status.bits());
32367        __tmp.put_i16_le(self.temperature);
32368        if matches!(version, MavlinkVersion::V2) {
32369            let len = __tmp.len();
32370            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32371        } else {
32372            __tmp.len()
32373        }
32374    }
32375}
32376#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
32377#[doc = ""]
32378#[doc = "ID: 231"]
32379#[derive(Debug, Clone, PartialEq)]
32380#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32381#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32382#[cfg_attr(feature = "ts", derive(TS))]
32383#[cfg_attr(feature = "ts", ts(export))]
32384pub struct WIND_COV_DATA {
32385    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32386    pub time_usec: u64,
32387    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
32388    pub wind_x: f32,
32389    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
32390    pub wind_y: f32,
32391    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
32392    pub wind_z: f32,
32393    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32394    pub var_horiz: f32,
32395    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32396    pub var_vert: f32,
32397    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
32398    pub wind_alt: f32,
32399    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
32400    pub horiz_accuracy: f32,
32401    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
32402    pub vert_accuracy: f32,
32403}
32404impl WIND_COV_DATA {
32405    pub const ENCODED_LEN: usize = 40usize;
32406    pub const DEFAULT: Self = Self {
32407        time_usec: 0_u64,
32408        wind_x: 0.0_f32,
32409        wind_y: 0.0_f32,
32410        wind_z: 0.0_f32,
32411        var_horiz: 0.0_f32,
32412        var_vert: 0.0_f32,
32413        wind_alt: 0.0_f32,
32414        horiz_accuracy: 0.0_f32,
32415        vert_accuracy: 0.0_f32,
32416    };
32417    #[cfg(feature = "arbitrary")]
32418    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32419        use arbitrary::{Arbitrary, Unstructured};
32420        let mut buf = [0u8; 1024];
32421        rng.fill_bytes(&mut buf);
32422        let mut unstructured = Unstructured::new(&buf);
32423        Self::arbitrary(&mut unstructured).unwrap_or_default()
32424    }
32425}
32426impl Default for WIND_COV_DATA {
32427    fn default() -> Self {
32428        Self::DEFAULT.clone()
32429    }
32430}
32431impl MessageData for WIND_COV_DATA {
32432    type Message = MavMessage;
32433    const ID: u32 = 231u32;
32434    const NAME: &'static str = "WIND_COV";
32435    const EXTRA_CRC: u8 = 105u8;
32436    const ENCODED_LEN: usize = 40usize;
32437    fn deser(
32438        _version: MavlinkVersion,
32439        __input: &[u8],
32440    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32441        let avail_len = __input.len();
32442        let mut payload_buf = [0; Self::ENCODED_LEN];
32443        let mut buf = if avail_len < Self::ENCODED_LEN {
32444            payload_buf[0..avail_len].copy_from_slice(__input);
32445            Bytes::new(&payload_buf)
32446        } else {
32447            Bytes::new(__input)
32448        };
32449        let mut __struct = Self::default();
32450        __struct.time_usec = buf.get_u64_le();
32451        __struct.wind_x = buf.get_f32_le();
32452        __struct.wind_y = buf.get_f32_le();
32453        __struct.wind_z = buf.get_f32_le();
32454        __struct.var_horiz = buf.get_f32_le();
32455        __struct.var_vert = buf.get_f32_le();
32456        __struct.wind_alt = buf.get_f32_le();
32457        __struct.horiz_accuracy = buf.get_f32_le();
32458        __struct.vert_accuracy = buf.get_f32_le();
32459        Ok(__struct)
32460    }
32461    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32462        let mut __tmp = BytesMut::new(bytes);
32463        #[allow(clippy::absurd_extreme_comparisons)]
32464        #[allow(unused_comparisons)]
32465        if __tmp.remaining() < Self::ENCODED_LEN {
32466            panic!(
32467                "buffer is too small (need {} bytes, but got {})",
32468                Self::ENCODED_LEN,
32469                __tmp.remaining(),
32470            )
32471        }
32472        __tmp.put_u64_le(self.time_usec);
32473        __tmp.put_f32_le(self.wind_x);
32474        __tmp.put_f32_le(self.wind_y);
32475        __tmp.put_f32_le(self.wind_z);
32476        __tmp.put_f32_le(self.var_horiz);
32477        __tmp.put_f32_le(self.var_vert);
32478        __tmp.put_f32_le(self.wind_alt);
32479        __tmp.put_f32_le(self.horiz_accuracy);
32480        __tmp.put_f32_le(self.vert_accuracy);
32481        if matches!(version, MavlinkVersion::V2) {
32482            let len = __tmp.len();
32483            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32484        } else {
32485            __tmp.len()
32486        }
32487    }
32488}
32489#[derive(Clone, PartialEq, Debug)]
32490#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32491#[cfg_attr(feature = "serde", serde(tag = "type"))]
32492#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32493#[cfg_attr(feature = "ts", derive(TS))]
32494#[cfg_attr(feature = "ts", ts(export))]
32495#[repr(u32)]
32496pub enum MavMessage {
32497    #[doc = "Set the vehicle attitude and body angular rates."]
32498    #[doc = ""]
32499    #[doc = "ID: 140"]
32500    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
32501    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
32502    #[doc = ""]
32503    #[doc = "ID: 375"]
32504    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
32505    #[doc = "The location and information of an ADSB vehicle."]
32506    #[doc = ""]
32507    #[doc = "ID: 246"]
32508    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
32509    #[doc = "The location and information of an AIS vessel."]
32510    #[doc = ""]
32511    #[doc = "ID: 301"]
32512    AIS_VESSEL(AIS_VESSEL_DATA),
32513    #[doc = "The current system altitude."]
32514    #[doc = ""]
32515    #[doc = "ID: 141"]
32516    ALTITUDE(ALTITUDE_DATA),
32517    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
32518    #[doc = ""]
32519    #[doc = "ID: 30"]
32520    ATTITUDE(ATTITUDE_DATA),
32521    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32522    #[doc = ""]
32523    #[doc = "ID: 31"]
32524    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
32525    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32526    #[doc = ""]
32527    #[doc = "ID: 61"]
32528    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
32529    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
32530    #[doc = ""]
32531    #[doc = "ID: 83"]
32532    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
32533    #[doc = "Motion capture attitude and position."]
32534    #[doc = ""]
32535    #[doc = "ID: 138"]
32536    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
32537    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
32538    #[doc = ""]
32539    #[doc = "ID: 7"]
32540    AUTH_KEY(AUTH_KEY_DATA),
32541    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
32542    #[doc = ""]
32543    #[doc = "ID: 286"]
32544    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
32545    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
32546    #[doc = ""]
32547    #[doc = "ID: 148"]
32548    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
32549    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
32550    #[doc = ""]
32551    #[doc = "ID: 435"]
32552    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
32553    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
32554    #[doc = ""]
32555    #[doc = "ID: 437"]
32556    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
32557    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
32558    #[doc = ""]
32559    #[doc = "ID: 372"]
32560    BATTERY_INFO(BATTERY_INFO_DATA),
32561    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
32562    #[doc = ""]
32563    #[doc = "ID: 147"]
32564    BATTERY_STATUS(BATTERY_STATUS_DATA),
32565    #[doc = "Report button state change."]
32566    #[doc = ""]
32567    #[doc = "ID: 257"]
32568    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
32569    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32570    #[doc = ""]
32571    #[doc = "ID: 262"]
32572    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
32573    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32574    #[doc = ""]
32575    #[doc = "ID: 271"]
32576    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
32577    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
32578    #[doc = ""]
32579    #[doc = "ID: 263"]
32580    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
32581    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32582    #[doc = ""]
32583    #[doc = "ID: 259"]
32584    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
32585    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32586    #[doc = ""]
32587    #[doc = "ID: 260"]
32588    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
32589    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
32590    #[doc = ""]
32591    #[doc = "ID: 277"]
32592    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
32593    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32594    #[doc = ""]
32595    #[doc = "ID: 276"]
32596    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
32597    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32598    #[doc = ""]
32599    #[doc = "ID: 275"]
32600    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
32601    #[doc = "Camera-IMU triggering and synchronisation message."]
32602    #[doc = ""]
32603    #[doc = "ID: 112"]
32604    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
32605    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
32606    #[doc = ""]
32607    #[doc = "ID: 387"]
32608    CANFD_FRAME(CANFD_FRAME_DATA),
32609    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
32610    #[doc = ""]
32611    #[doc = "ID: 388"]
32612    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
32613    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
32614    #[doc = ""]
32615    #[doc = "ID: 386"]
32616    CAN_FRAME(CAN_FRAME_DATA),
32617    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32618    #[doc = ""]
32619    #[doc = "ID: 336"]
32620    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
32621    #[doc = "Report current used cellular network status."]
32622    #[doc = ""]
32623    #[doc = "ID: 334"]
32624    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
32625    #[doc = "Request to control this MAV."]
32626    #[doc = ""]
32627    #[doc = "ID: 5"]
32628    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
32629    #[doc = "Accept / deny control of this MAV."]
32630    #[doc = ""]
32631    #[doc = "ID: 6"]
32632    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
32633    #[doc = "Information about a potential collision."]
32634    #[doc = ""]
32635    #[doc = "ID: 247"]
32636    COLLISION(COLLISION_DATA),
32637    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32638    #[doc = ""]
32639    #[doc = "ID: 77"]
32640    COMMAND_ACK(COMMAND_ACK_DATA),
32641    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32642    #[doc = ""]
32643    #[doc = "ID: 80"]
32644    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
32645    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32646    #[doc = ""]
32647    #[doc = "ID: 75"]
32648    COMMAND_INT(COMMAND_INT_DATA),
32649    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32650    #[doc = ""]
32651    #[doc = "ID: 76"]
32652    COMMAND_LONG(COMMAND_LONG_DATA),
32653    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
32654    #[doc = ""]
32655    #[doc = "ID: 395"]
32656    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
32657    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
32658    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
32659    #[doc = ""]
32660    #[doc = "ID: 396"]
32661    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
32662    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
32663    #[doc = ""]
32664    #[doc = "ID: 397"]
32665    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
32666    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
32667    #[doc = ""]
32668    #[doc = "ID: 146"]
32669    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
32670    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
32671    #[doc = ""]
32672    #[doc = "ID: 411"]
32673    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
32674    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
32675    #[doc = ""]
32676    #[doc = "ID: 436"]
32677    CURRENT_MODE(CURRENT_MODE_DATA),
32678    #[doc = "Data stream status information."]
32679    #[doc = ""]
32680    #[doc = "ID: 67"]
32681    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
32682    DATA_STREAM(DATA_STREAM_DATA),
32683    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32684    #[doc = ""]
32685    #[doc = "ID: 130"]
32686    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
32687    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
32688    #[doc = ""]
32689    #[doc = "ID: 254"]
32690    DEBUG(DEBUG_DATA),
32691    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
32692    #[doc = ""]
32693    #[doc = "ID: 350"]
32694    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
32695    #[doc = "To debug something using a named 3D vector."]
32696    #[doc = ""]
32697    #[doc = "ID: 250"]
32698    DEBUG_VECT(DEBUG_VECT_DATA),
32699    #[doc = "Distance sensor information for an onboard rangefinder."]
32700    #[doc = ""]
32701    #[doc = "ID: 132"]
32702    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
32703    #[doc = "EFI status output."]
32704    #[doc = ""]
32705    #[doc = "ID: 225"]
32706    EFI_STATUS(EFI_STATUS_DATA),
32707    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32708    #[doc = ""]
32709    #[doc = "ID: 131"]
32710    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
32711    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
32712    #[doc = ""]
32713    #[doc = "ID: 290"]
32714    ESC_INFO(ESC_INFO_DATA),
32715    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
32716    #[doc = ""]
32717    #[doc = "ID: 291"]
32718    ESC_STATUS(ESC_STATUS_DATA),
32719    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
32720    #[doc = ""]
32721    #[doc = "ID: 230"]
32722    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
32723    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
32724    #[doc = ""]
32725    #[doc = "ID: 410"]
32726    EVENT(EVENT_DATA),
32727    #[doc = "Provides state for additional features."]
32728    #[doc = ""]
32729    #[doc = "ID: 245"]
32730    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
32731    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
32732    #[doc = ""]
32733    #[doc = "ID: 162"]
32734    FENCE_STATUS(FENCE_STATUS_DATA),
32735    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
32736    #[doc = ""]
32737    #[doc = "ID: 110"]
32738    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
32739    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
32740    #[doc = ""]
32741    #[doc = "ID: 264"]
32742    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
32743    #[doc = "Current motion information from a designated system."]
32744    #[doc = ""]
32745    #[doc = "ID: 144"]
32746    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
32747    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
32748    #[doc = ""]
32749    #[doc = "ID: 371"]
32750    FUEL_STATUS(FUEL_STATUS_DATA),
32751    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
32752    #[doc = ""]
32753    #[doc = "ID: 373"]
32754    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
32755    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
32756    #[doc = ""]
32757    #[doc = "ID: 285"]
32758    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
32759    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
32760    #[doc = ""]
32761    #[doc = "ID: 283"]
32762    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
32763    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
32764    #[doc = ""]
32765    #[doc = "ID: 284"]
32766    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
32767    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
32768    #[doc = ""]
32769    #[doc = "ID: 280"]
32770    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
32771    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32772    #[doc = ""]
32773    #[doc = "ID: 282"]
32774    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
32775    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32776    #[doc = ""]
32777    #[doc = "ID: 288"]
32778    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
32779    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
32780    #[doc = ""]
32781    #[doc = "ID: 287"]
32782    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
32783    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
32784    #[doc = ""]
32785    #[doc = "ID: 281"]
32786    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
32787    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
32788    #[doc = ""]
32789    #[doc = "ID: 33"]
32790    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
32791    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
32792    #[doc = ""]
32793    #[doc = "ID: 63"]
32794    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
32795    #[doc = "Global position/attitude estimate from a vision source."]
32796    #[doc = ""]
32797    #[doc = "ID: 101"]
32798    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
32799    #[doc = "Second GPS data."]
32800    #[doc = ""]
32801    #[doc = "ID: 124"]
32802    GPS2_RAW(GPS2_RAW_DATA),
32803    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32804    #[doc = ""]
32805    #[doc = "ID: 128"]
32806    GPS2_RTK(GPS2_RTK_DATA),
32807    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
32808    #[doc = ""]
32809    #[doc = "ID: 49"]
32810    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
32811    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
32812    #[doc = ""]
32813    #[doc = "ID: 123"]
32814    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
32815    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
32816    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
32817    #[doc = ""]
32818    #[doc = "ID: 232"]
32819    GPS_INPUT(GPS_INPUT_DATA),
32820    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32821    #[doc = ""]
32822    #[doc = "ID: 24"]
32823    GPS_RAW_INT(GPS_RAW_INT_DATA),
32824    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
32825    #[doc = ""]
32826    #[doc = "ID: 233"]
32827    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
32828    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32829    #[doc = ""]
32830    #[doc = "ID: 127"]
32831    GPS_RTK(GPS_RTK_DATA),
32832    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
32833    #[doc = ""]
32834    #[doc = "ID: 25"]
32835    GPS_STATUS(GPS_STATUS_DATA),
32836    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
32837    #[doc = ""]
32838    #[doc = "ID: 0"]
32839    HEARTBEAT(HEARTBEAT_DATA),
32840    #[doc = "The IMU readings in SI units in NED body frame."]
32841    #[doc = ""]
32842    #[doc = "ID: 105"]
32843    HIGHRES_IMU(HIGHRES_IMU_DATA),
32844    #[doc = "Message appropriate for high latency connections like Iridium."]
32845    #[doc = ""]
32846    #[doc = "ID: 234"]
32847    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
32848    HIGH_LATENCY(HIGH_LATENCY_DATA),
32849    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
32850    #[doc = ""]
32851    #[doc = "ID: 235"]
32852    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
32853    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
32854    #[doc = ""]
32855    #[doc = "ID: 93"]
32856    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
32857    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
32858    #[doc = ""]
32859    #[doc = "ID: 91"]
32860    HIL_CONTROLS(HIL_CONTROLS_DATA),
32861    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32862    #[doc = ""]
32863    #[doc = "ID: 113"]
32864    HIL_GPS(HIL_GPS_DATA),
32865    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
32866    #[doc = ""]
32867    #[doc = "ID: 114"]
32868    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
32869    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
32870    #[doc = ""]
32871    #[doc = "ID: 92"]
32872    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
32873    #[doc = "The IMU readings in SI units in NED body frame."]
32874    #[doc = ""]
32875    #[doc = "ID: 107"]
32876    HIL_SENSOR(HIL_SENSOR_DATA),
32877    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32878    #[doc = ""]
32879    #[doc = "ID: 90"]
32880    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
32881    HIL_STATE(HIL_STATE_DATA),
32882    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32883    #[doc = ""]
32884    #[doc = "ID: 115"]
32885    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
32886    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
32887    #[doc = ""]
32888    #[doc = "ID: 242"]
32889    HOME_POSITION(HOME_POSITION_DATA),
32890    #[doc = "Temperature and humidity from hygrometer."]
32891    #[doc = ""]
32892    #[doc = "ID: 12920"]
32893    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
32894    #[doc = "Illuminator status."]
32895    #[doc = ""]
32896    #[doc = "ID: 440"]
32897    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
32898    #[doc = "Status of the Iridium SBD link."]
32899    #[doc = ""]
32900    #[doc = "ID: 335"]
32901    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
32902    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
32903    #[doc = ""]
32904    #[doc = "ID: 149"]
32905    LANDING_TARGET(LANDING_TARGET_DATA),
32906    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
32907    #[doc = ""]
32908    #[doc = "ID: 8"]
32909    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
32910    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32911    #[doc = ""]
32912    #[doc = "ID: 32"]
32913    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
32914    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32915    #[doc = ""]
32916    #[doc = "ID: 64"]
32917    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
32918    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32919    #[doc = ""]
32920    #[doc = "ID: 89"]
32921    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
32922    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
32923    #[doc = ""]
32924    #[doc = "ID: 268"]
32925    LOGGING_ACK(LOGGING_ACK_DATA),
32926    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
32927    #[doc = ""]
32928    #[doc = "ID: 266"]
32929    LOGGING_DATA(LOGGING_DATA_DATA),
32930    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
32931    #[doc = ""]
32932    #[doc = "ID: 267"]
32933    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
32934    #[doc = "Reply to LOG_REQUEST_DATA."]
32935    #[doc = ""]
32936    #[doc = "ID: 120"]
32937    LOG_DATA(LOG_DATA_DATA),
32938    #[doc = "Reply to LOG_REQUEST_LIST."]
32939    #[doc = ""]
32940    #[doc = "ID: 118"]
32941    LOG_ENTRY(LOG_ENTRY_DATA),
32942    #[doc = "Erase all logs."]
32943    #[doc = ""]
32944    #[doc = "ID: 121"]
32945    LOG_ERASE(LOG_ERASE_DATA),
32946    #[doc = "Request a chunk of a log."]
32947    #[doc = ""]
32948    #[doc = "ID: 119"]
32949    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
32950    #[doc = "Stop log transfer and resume normal logging."]
32951    #[doc = ""]
32952    #[doc = "ID: 122"]
32953    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
32954    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
32955    #[doc = ""]
32956    #[doc = "ID: 117"]
32957    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
32958    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
32959    #[doc = ""]
32960    #[doc = "ID: 192"]
32961    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
32962    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
32963    #[doc = ""]
32964    #[doc = "ID: 69"]
32965    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
32966    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
32967    #[doc = ""]
32968    #[doc = "ID: 81"]
32969    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
32970    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
32971    #[doc = ""]
32972    #[doc = "ID: 249"]
32973    MEMORY_VECT(MEMORY_VECT_DATA),
32974    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
32975    #[doc = ""]
32976    #[doc = "ID: 244"]
32977    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
32978    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
32979    #[doc = ""]
32980    #[doc = "ID: 47"]
32981    MISSION_ACK(MISSION_ACK_DATA),
32982    #[doc = "Delete all mission items at once."]
32983    #[doc = ""]
32984    #[doc = "ID: 45"]
32985    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
32986    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
32987    #[doc = ""]
32988    #[doc = "ID: 44"]
32989    MISSION_COUNT(MISSION_COUNT_DATA),
32990    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
32991    #[doc = ""]
32992    #[doc = "ID: 42"]
32993    MISSION_CURRENT(MISSION_CURRENT_DATA),
32994    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
32995    #[doc = ""]
32996    #[doc = "ID: 39"]
32997    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
32998    MISSION_ITEM(MISSION_ITEM_DATA),
32999    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
33000    #[doc = ""]
33001    #[doc = "ID: 73"]
33002    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
33003    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
33004    #[doc = ""]
33005    #[doc = "ID: 46"]
33006    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
33007    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
33008    #[doc = ""]
33009    #[doc = "ID: 40"]
33010    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
33011    MISSION_REQUEST(MISSION_REQUEST_DATA),
33012    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
33013    #[doc = ""]
33014    #[doc = "ID: 51"]
33015    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
33016    #[doc = "Request the overall list of mission items from the system/component."]
33017    #[doc = ""]
33018    #[doc = "ID: 43"]
33019    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
33020    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
33021    #[doc = ""]
33022    #[doc = "ID: 37"]
33023    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
33024    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
33025    #[doc = ""]
33026    #[doc = "ID: 41"]
33027    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
33028    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
33029    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
33030    #[doc = ""]
33031    #[doc = "ID: 38"]
33032    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
33033    #[doc = "Orientation of a mount."]
33034    #[doc = ""]
33035    #[doc = "ID: 265"]
33036    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
33037    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
33038    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33039    #[doc = ""]
33040    #[doc = "ID: 251"]
33041    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
33042    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33043    #[doc = ""]
33044    #[doc = "ID: 252"]
33045    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
33046    #[doc = "The state of the navigation and position controller."]
33047    #[doc = ""]
33048    #[doc = "ID: 62"]
33049    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
33050    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
33051    #[doc = ""]
33052    #[doc = "ID: 330"]
33053    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
33054    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
33055    #[doc = ""]
33056    #[doc = "ID: 331"]
33057    ODOMETRY(ODOMETRY_DATA),
33058    #[doc = "Hardware status sent by an onboard computer."]
33059    #[doc = ""]
33060    #[doc = "ID: 390"]
33061    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
33062    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
33063    #[doc = ""]
33064    #[doc = "ID: 12918"]
33065    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
33066    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
33067    #[doc = ""]
33068    #[doc = "ID: 12902"]
33069    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
33070    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
33071    #[doc = ""]
33072    #[doc = "ID: 12900"]
33073    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
33074    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
33075    #[doc = ""]
33076    #[doc = "ID: 12901"]
33077    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
33078    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
33079    #[doc = ""]
33080    #[doc = "ID: 12915"]
33081    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
33082    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
33083    #[doc = ""]
33084    #[doc = "ID: 12905"]
33085    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
33086    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
33087    #[doc = ""]
33088    #[doc = "ID: 12903"]
33089    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
33090    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
33091    #[doc = ""]
33092    #[doc = "ID: 12904"]
33093    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
33094    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
33095    #[doc = ""]
33096    #[doc = "ID: 12919"]
33097    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
33098    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
33099    #[doc = ""]
33100    #[doc = "ID: 100"]
33101    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
33102    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
33103    #[doc = ""]
33104    #[doc = "ID: 106"]
33105    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
33106    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
33107    #[doc = ""]
33108    #[doc = "ID: 360"]
33109    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
33110    #[doc = "Response from a PARAM_EXT_SET message."]
33111    #[doc = ""]
33112    #[doc = "ID: 324"]
33113    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
33114    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
33115    #[doc = ""]
33116    #[doc = "ID: 321"]
33117    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
33118    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
33119    #[doc = ""]
33120    #[doc = "ID: 320"]
33121    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
33122    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
33123    #[doc = ""]
33124    #[doc = "ID: 323"]
33125    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
33126    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
33127    #[doc = ""]
33128    #[doc = "ID: 322"]
33129    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
33130    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
33131    #[doc = ""]
33132    #[doc = "ID: 50"]
33133    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
33134    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33135    #[doc = ""]
33136    #[doc = "ID: 21"]
33137    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
33138    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
33139    #[doc = ""]
33140    #[doc = "ID: 20"]
33141    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
33142    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33143    #[doc = ""]
33144    #[doc = "ID: 23"]
33145    PARAM_SET(PARAM_SET_DATA),
33146    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33147    #[doc = ""]
33148    #[doc = "ID: 22"]
33149    PARAM_VALUE(PARAM_VALUE_DATA),
33150    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
33151    #[doc = ""]
33152    #[doc = "ID: 4"]
33153    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
33154    PING(PING_DATA),
33155    #[doc = "Control vehicle tone generation (buzzer)."]
33156    #[doc = ""]
33157    #[doc = "ID: 258"]
33158    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
33159    PLAY_TUNE(PLAY_TUNE_DATA),
33160    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
33161    #[doc = ""]
33162    #[doc = "ID: 400"]
33163    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
33164    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
33165    #[doc = ""]
33166    #[doc = "ID: 87"]
33167    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
33168    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
33169    #[doc = ""]
33170    #[doc = "ID: 85"]
33171    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
33172    #[doc = "Power supply status."]
33173    #[doc = ""]
33174    #[doc = "ID: 125"]
33175    POWER_STATUS(POWER_STATUS_DATA),
33176    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
33177    #[doc = ""]
33178    #[doc = "ID: 300"]
33179    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
33180    #[doc = "Status generated by radio and injected into MAVLink stream."]
33181    #[doc = ""]
33182    #[doc = "ID: 109"]
33183    RADIO_STATUS(RADIO_STATUS_DATA),
33184    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
33185    #[doc = ""]
33186    #[doc = "ID: 27"]
33187    RAW_IMU(RAW_IMU_DATA),
33188    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
33189    #[doc = ""]
33190    #[doc = "ID: 28"]
33191    RAW_PRESSURE(RAW_PRESSURE_DATA),
33192    #[doc = "RPM sensor data message."]
33193    #[doc = ""]
33194    #[doc = "ID: 339"]
33195    RAW_RPM(RAW_RPM_DATA),
33196    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33197    #[doc = ""]
33198    #[doc = "ID: 65"]
33199    RC_CHANNELS(RC_CHANNELS_DATA),
33200    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
33201    #[doc = ""]
33202    #[doc = "ID: 70"]
33203    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
33204    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33205    #[doc = ""]
33206    #[doc = "ID: 35"]
33207    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
33208    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
33209    #[doc = ""]
33210    #[doc = "ID: 34"]
33211    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
33212    #[doc = "Request a data stream."]
33213    #[doc = ""]
33214    #[doc = "ID: 66"]
33215    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
33216    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
33217    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
33218    #[doc = ""]
33219    #[doc = "ID: 412"]
33220    REQUEST_EVENT(REQUEST_EVENT_DATA),
33221    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
33222    #[doc = ""]
33223    #[doc = "ID: 142"]
33224    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
33225    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
33226    #[doc = ""]
33227    #[doc = "ID: 413"]
33228    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
33229    #[doc = "Read out the safety zone the MAV currently assumes."]
33230    #[doc = ""]
33231    #[doc = "ID: 55"]
33232    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
33233    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
33234    #[doc = ""]
33235    #[doc = "ID: 54"]
33236    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
33237    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
33238    #[doc = ""]
33239    #[doc = "ID: 26"]
33240    SCALED_IMU(SCALED_IMU_DATA),
33241    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
33242    #[doc = ""]
33243    #[doc = "ID: 116"]
33244    SCALED_IMU2(SCALED_IMU2_DATA),
33245    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
33246    #[doc = ""]
33247    #[doc = "ID: 129"]
33248    SCALED_IMU3(SCALED_IMU3_DATA),
33249    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
33250    #[doc = ""]
33251    #[doc = "ID: 29"]
33252    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
33253    #[doc = "Barometer readings for 2nd barometer."]
33254    #[doc = ""]
33255    #[doc = "ID: 137"]
33256    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
33257    #[doc = "Barometer readings for 3rd barometer."]
33258    #[doc = ""]
33259    #[doc = "ID: 143"]
33260    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
33261    #[doc = "This message is emitted as response to SCRIPT_REQUEST_LIST by the MAV to get the number of mission scripts."]
33262    #[doc = ""]
33263    #[doc = "ID: 183"]
33264    SCRIPT_COUNT(SCRIPT_COUNT_DATA),
33265    #[doc = "This message informs about the currently active SCRIPT."]
33266    #[doc = ""]
33267    #[doc = "ID: 184"]
33268    SCRIPT_CURRENT(SCRIPT_CURRENT_DATA),
33269    #[doc = "Message encoding a mission script item. This message is emitted upon a request for the next script item."]
33270    #[doc = ""]
33271    #[doc = "ID: 180"]
33272    SCRIPT_ITEM(SCRIPT_ITEM_DATA),
33273    #[doc = "Request script item with the sequence number seq. The response of the system to this message should be a SCRIPT_ITEM message."]
33274    #[doc = ""]
33275    #[doc = "ID: 181"]
33276    SCRIPT_REQUEST(SCRIPT_REQUEST_DATA),
33277    #[doc = "Request the overall list of mission items from the system/component."]
33278    #[doc = ""]
33279    #[doc = "ID: 182"]
33280    SCRIPT_REQUEST_LIST(SCRIPT_REQUEST_LIST_DATA),
33281    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
33282    #[doc = ""]
33283    #[doc = "ID: 126"]
33284    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
33285    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
33286    #[doc = ""]
33287    #[doc = "ID: 36"]
33288    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
33289    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
33290    #[doc = ""]
33291    #[doc = "ID: 256"]
33292    SETUP_SIGNING(SETUP_SIGNING_DATA),
33293    #[doc = "Set the vehicle attitude and body angular rates."]
33294    #[doc = ""]
33295    #[doc = "ID: 139"]
33296    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
33297    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
33298    #[doc = ""]
33299    #[doc = "ID: 82"]
33300    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
33301    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
33302    #[doc = ""]
33303    #[doc = "ID: 48"]
33304    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
33305    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
33306    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
33307    #[doc = ""]
33308    #[doc = "ID: 243"]
33309    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
33310    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
33311    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
33312    #[doc = ""]
33313    #[doc = "ID: 11"]
33314    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
33315    SET_MODE(SET_MODE_DATA),
33316    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
33317    #[doc = ""]
33318    #[doc = "ID: 86"]
33319    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
33320    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
33321    #[doc = ""]
33322    #[doc = "ID: 84"]
33323    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
33324    #[doc = "Status of simulation environment, if used."]
33325    #[doc = ""]
33326    #[doc = "ID: 108"]
33327    SIM_STATE(SIM_STATE_DATA),
33328    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
33329    #[doc = ""]
33330    #[doc = "ID: 370"]
33331    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
33332    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
33333    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
33334    #[doc = ""]
33335    #[doc = "ID: 253"]
33336    STATUSTEXT(STATUSTEXT_DATA),
33337    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
33338    #[doc = ""]
33339    #[doc = "ID: 261"]
33340    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
33341    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
33342    #[doc = ""]
33343    #[doc = "ID: 401"]
33344    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
33345    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
33346    #[doc = ""]
33347    #[doc = "ID: 2"]
33348    SYSTEM_TIME(SYSTEM_TIME_DATA),
33349    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
33350    #[doc = ""]
33351    #[doc = "ID: 1"]
33352    SYS_STATUS(SYS_STATUS_DATA),
33353    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
33354    #[doc = ""]
33355    #[doc = "ID: 135"]
33356    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
33357    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33358    #[doc = ""]
33359    #[doc = "ID: 134"]
33360    TERRAIN_DATA(TERRAIN_DATA_DATA),
33361    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33362    #[doc = ""]
33363    #[doc = "ID: 136"]
33364    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
33365    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33366    #[doc = ""]
33367    #[doc = "ID: 133"]
33368    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
33369    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
33370    #[doc = ""]
33371    #[doc = "ID: 111"]
33372    TIMESYNC(TIMESYNC_DATA),
33373    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
33374    #[doc = ""]
33375    #[doc = "ID: 380"]
33376    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
33377    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
33378    #[doc = ""]
33379    #[doc = "ID: 333"]
33380    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
33381    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
33382    #[doc = ""]
33383    #[doc = "ID: 332"]
33384    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
33385    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
33386    #[doc = ""]
33387    #[doc = "ID: 385"]
33388    TUNNEL(TUNNEL_DATA),
33389    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
33390    #[doc = ""]
33391    #[doc = "ID: 311"]
33392    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
33393    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
33394    #[doc = ""]
33395    #[doc = "ID: 310"]
33396    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
33397    #[doc = "The global position resulting from GPS and sensor fusion."]
33398    #[doc = ""]
33399    #[doc = "ID: 340"]
33400    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
33401    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
33402    #[doc = ""]
33403    #[doc = "ID: 248"]
33404    V2_EXTENSION(V2_EXTENSION_DATA),
33405    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
33406    #[doc = ""]
33407    #[doc = "ID: 74"]
33408    VFR_HUD(VFR_HUD_DATA),
33409    #[doc = "Vibration levels and accelerometer clipping."]
33410    #[doc = ""]
33411    #[doc = "ID: 241"]
33412    VIBRATION(VIBRATION_DATA),
33413    #[doc = "Global position estimate from a Vicon motion system source."]
33414    #[doc = ""]
33415    #[doc = "ID: 104"]
33416    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
33417    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
33418    #[doc = ""]
33419    #[doc = "ID: 269"]
33420    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
33421    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
33422    #[doc = ""]
33423    #[doc = "ID: 270"]
33424    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
33425    #[doc = "Local position/attitude estimate from a vision source."]
33426    #[doc = ""]
33427    #[doc = "ID: 102"]
33428    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
33429    #[doc = "Speed estimate from a vision source."]
33430    #[doc = ""]
33431    #[doc = "ID: 103"]
33432    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
33433    #[doc = "Cumulative distance traveled for each reported wheel."]
33434    #[doc = ""]
33435    #[doc = "ID: 9000"]
33436    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
33437    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33438    #[doc = ""]
33439    #[doc = "ID: 299"]
33440    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
33441    #[doc = "Winch status."]
33442    #[doc = ""]
33443    #[doc = "ID: 9005"]
33444    WINCH_STATUS(WINCH_STATUS_DATA),
33445    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
33446    #[doc = ""]
33447    #[doc = "ID: 231"]
33448    WIND_COV(WIND_COV_DATA),
33449}
33450impl MavMessage {
33451    pub const fn all_ids() -> &'static [u32] {
33452        &[
33453            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
33454            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
33455            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
33456            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
33457            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
33458            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
33459            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
33460            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
33461            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
33462            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
33463            148u32, 149u32, 162u32, 180u32, 181u32, 182u32, 183u32, 184u32, 192u32, 225u32, 230u32,
33464            231u32, 232u32, 233u32, 234u32, 235u32, 241u32, 242u32, 243u32, 244u32, 245u32, 246u32,
33465            247u32, 248u32, 249u32, 250u32, 251u32, 252u32, 253u32, 254u32, 256u32, 257u32, 258u32,
33466            259u32, 260u32, 261u32, 262u32, 263u32, 264u32, 265u32, 266u32, 267u32, 268u32, 269u32,
33467            270u32, 271u32, 275u32, 276u32, 277u32, 280u32, 281u32, 282u32, 283u32, 284u32, 285u32,
33468            286u32, 287u32, 288u32, 290u32, 291u32, 299u32, 300u32, 301u32, 310u32, 311u32, 320u32,
33469            321u32, 322u32, 323u32, 324u32, 330u32, 331u32, 332u32, 333u32, 334u32, 335u32, 336u32,
33470            339u32, 340u32, 350u32, 360u32, 370u32, 371u32, 372u32, 373u32, 375u32, 380u32, 385u32,
33471            386u32, 387u32, 388u32, 390u32, 395u32, 396u32, 397u32, 400u32, 401u32, 410u32, 411u32,
33472            412u32, 413u32, 435u32, 436u32, 437u32, 440u32, 9000u32, 9005u32, 12900u32, 12901u32,
33473            12902u32, 12903u32, 12904u32, 12905u32, 12915u32, 12918u32, 12919u32, 12920u32,
33474        ]
33475    }
33476}
33477impl Message for MavMessage {
33478    fn parse(
33479        version: MavlinkVersion,
33480        id: u32,
33481        payload: &[u8],
33482    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33483        match id {
33484            ACTUATOR_CONTROL_TARGET_DATA::ID => {
33485                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
33486                    .map(Self::ACTUATOR_CONTROL_TARGET)
33487            }
33488            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
33489                .map(Self::ACTUATOR_OUTPUT_STATUS),
33490            ADSB_VEHICLE_DATA::ID => {
33491                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
33492            }
33493            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
33494            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
33495            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
33496            ATTITUDE_QUATERNION_DATA::ID => {
33497                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
33498            }
33499            ATTITUDE_QUATERNION_COV_DATA::ID => {
33500                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
33501                    .map(Self::ATTITUDE_QUATERNION_COV)
33502            }
33503            ATTITUDE_TARGET_DATA::ID => {
33504                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
33505            }
33506            ATT_POS_MOCAP_DATA::ID => {
33507                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
33508            }
33509            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
33510            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33511                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
33512                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
33513            }
33514            AUTOPILOT_VERSION_DATA::ID => {
33515                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
33516            }
33517            AVAILABLE_MODES_DATA::ID => {
33518                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
33519            }
33520            AVAILABLE_MODES_MONITOR_DATA::ID => {
33521                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
33522                    .map(Self::AVAILABLE_MODES_MONITOR)
33523            }
33524            BATTERY_INFO_DATA::ID => {
33525                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
33526            }
33527            BATTERY_STATUS_DATA::ID => {
33528                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
33529            }
33530            BUTTON_CHANGE_DATA::ID => {
33531                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
33532            }
33533            CAMERA_CAPTURE_STATUS_DATA::ID => {
33534                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
33535            }
33536            CAMERA_FOV_STATUS_DATA::ID => {
33537                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
33538            }
33539            CAMERA_IMAGE_CAPTURED_DATA::ID => {
33540                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
33541            }
33542            CAMERA_INFORMATION_DATA::ID => {
33543                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
33544            }
33545            CAMERA_SETTINGS_DATA::ID => {
33546                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
33547            }
33548            CAMERA_THERMAL_RANGE_DATA::ID => {
33549                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
33550            }
33551            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
33552                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
33553                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
33554            }
33555            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
33556                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
33557                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
33558            }
33559            CAMERA_TRIGGER_DATA::ID => {
33560                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
33561            }
33562            CANFD_FRAME_DATA::ID => {
33563                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
33564            }
33565            CAN_FILTER_MODIFY_DATA::ID => {
33566                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
33567            }
33568            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
33569            CELLULAR_CONFIG_DATA::ID => {
33570                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
33571            }
33572            CELLULAR_STATUS_DATA::ID => {
33573                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
33574            }
33575            CHANGE_OPERATOR_CONTROL_DATA::ID => {
33576                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
33577                    .map(Self::CHANGE_OPERATOR_CONTROL)
33578            }
33579            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
33580                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
33581                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
33582            }
33583            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
33584            COMMAND_ACK_DATA::ID => {
33585                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
33586            }
33587            COMMAND_CANCEL_DATA::ID => {
33588                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
33589            }
33590            COMMAND_INT_DATA::ID => {
33591                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
33592            }
33593            COMMAND_LONG_DATA::ID => {
33594                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
33595            }
33596            COMPONENT_INFORMATION_DATA::ID => {
33597                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
33598            }
33599            COMPONENT_INFORMATION_BASIC_DATA::ID => {
33600                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
33601                    .map(Self::COMPONENT_INFORMATION_BASIC)
33602            }
33603            COMPONENT_METADATA_DATA::ID => {
33604                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
33605            }
33606            CONTROL_SYSTEM_STATE_DATA::ID => {
33607                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
33608            }
33609            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
33610                .map(Self::CURRENT_EVENT_SEQUENCE),
33611            CURRENT_MODE_DATA::ID => {
33612                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
33613            }
33614            DATA_STREAM_DATA::ID => {
33615                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
33616            }
33617            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
33618                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
33619                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
33620            }
33621            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
33622            DEBUG_FLOAT_ARRAY_DATA::ID => {
33623                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
33624            }
33625            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
33626            DISTANCE_SENSOR_DATA::ID => {
33627                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
33628            }
33629            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
33630            ENCAPSULATED_DATA_DATA::ID => {
33631                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
33632            }
33633            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
33634            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
33635            ESTIMATOR_STATUS_DATA::ID => {
33636                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
33637            }
33638            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
33639            EXTENDED_SYS_STATE_DATA::ID => {
33640                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
33641            }
33642            FENCE_STATUS_DATA::ID => {
33643                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
33644            }
33645            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
33646                .map(Self::FILE_TRANSFER_PROTOCOL),
33647            FLIGHT_INFORMATION_DATA::ID => {
33648                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
33649            }
33650            FOLLOW_TARGET_DATA::ID => {
33651                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
33652            }
33653            FUEL_STATUS_DATA::ID => {
33654                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
33655            }
33656            GENERATOR_STATUS_DATA::ID => {
33657                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
33658            }
33659            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
33660                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
33661                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
33662            }
33663            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
33664                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
33665                    .map(Self::GIMBAL_DEVICE_INFORMATION)
33666            }
33667            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
33668                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
33669                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
33670            }
33671            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
33672                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
33673                    .map(Self::GIMBAL_MANAGER_INFORMATION)
33674            }
33675            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
33676                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
33677                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
33678            }
33679            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
33680                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
33681                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
33682            }
33683            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
33684                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
33685                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
33686            }
33687            GIMBAL_MANAGER_STATUS_DATA::ID => {
33688                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
33689            }
33690            GLOBAL_POSITION_INT_DATA::ID => {
33691                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
33692            }
33693            GLOBAL_POSITION_INT_COV_DATA::ID => {
33694                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
33695                    .map(Self::GLOBAL_POSITION_INT_COV)
33696            }
33697            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
33698                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
33699                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
33700            }
33701            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
33702            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
33703            GPS_GLOBAL_ORIGIN_DATA::ID => {
33704                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
33705            }
33706            GPS_INJECT_DATA_DATA::ID => {
33707                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
33708            }
33709            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
33710            GPS_RAW_INT_DATA::ID => {
33711                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
33712            }
33713            GPS_RTCM_DATA_DATA::ID => {
33714                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
33715            }
33716            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
33717            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
33718            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
33719            HIGHRES_IMU_DATA::ID => {
33720                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
33721            }
33722            HIGH_LATENCY_DATA::ID => {
33723                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
33724            }
33725            HIGH_LATENCY2_DATA::ID => {
33726                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
33727            }
33728            HIL_ACTUATOR_CONTROLS_DATA::ID => {
33729                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
33730            }
33731            HIL_CONTROLS_DATA::ID => {
33732                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
33733            }
33734            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
33735            HIL_OPTICAL_FLOW_DATA::ID => {
33736                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
33737            }
33738            HIL_RC_INPUTS_RAW_DATA::ID => {
33739                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
33740            }
33741            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
33742            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
33743            HIL_STATE_QUATERNION_DATA::ID => {
33744                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
33745            }
33746            HOME_POSITION_DATA::ID => {
33747                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
33748            }
33749            HYGROMETER_SENSOR_DATA::ID => {
33750                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
33751            }
33752            ILLUMINATOR_STATUS_DATA::ID => {
33753                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
33754            }
33755            ISBD_LINK_STATUS_DATA::ID => {
33756                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
33757            }
33758            LANDING_TARGET_DATA::ID => {
33759                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
33760            }
33761            LINK_NODE_STATUS_DATA::ID => {
33762                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
33763            }
33764            LOCAL_POSITION_NED_DATA::ID => {
33765                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
33766            }
33767            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
33768                .map(Self::LOCAL_POSITION_NED_COV),
33769            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
33770                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
33771                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
33772            }
33773            LOGGING_ACK_DATA::ID => {
33774                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
33775            }
33776            LOGGING_DATA_DATA::ID => {
33777                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
33778            }
33779            LOGGING_DATA_ACKED_DATA::ID => {
33780                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
33781            }
33782            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
33783            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
33784            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
33785            LOG_REQUEST_DATA_DATA::ID => {
33786                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
33787            }
33788            LOG_REQUEST_END_DATA::ID => {
33789                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
33790            }
33791            LOG_REQUEST_LIST_DATA::ID => {
33792                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
33793            }
33794            MAG_CAL_REPORT_DATA::ID => {
33795                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
33796            }
33797            MANUAL_CONTROL_DATA::ID => {
33798                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
33799            }
33800            MANUAL_SETPOINT_DATA::ID => {
33801                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
33802            }
33803            MEMORY_VECT_DATA::ID => {
33804                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
33805            }
33806            MESSAGE_INTERVAL_DATA::ID => {
33807                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
33808            }
33809            MISSION_ACK_DATA::ID => {
33810                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
33811            }
33812            MISSION_CLEAR_ALL_DATA::ID => {
33813                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
33814            }
33815            MISSION_COUNT_DATA::ID => {
33816                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
33817            }
33818            MISSION_CURRENT_DATA::ID => {
33819                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
33820            }
33821            MISSION_ITEM_DATA::ID => {
33822                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
33823            }
33824            MISSION_ITEM_INT_DATA::ID => {
33825                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
33826            }
33827            MISSION_ITEM_REACHED_DATA::ID => {
33828                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
33829            }
33830            MISSION_REQUEST_DATA::ID => {
33831                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
33832            }
33833            MISSION_REQUEST_INT_DATA::ID => {
33834                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
33835            }
33836            MISSION_REQUEST_LIST_DATA::ID => {
33837                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
33838            }
33839            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
33840                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
33841                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
33842            }
33843            MISSION_SET_CURRENT_DATA::ID => {
33844                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
33845            }
33846            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
33847                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
33848                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
33849            }
33850            MOUNT_ORIENTATION_DATA::ID => {
33851                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
33852            }
33853            NAMED_VALUE_FLOAT_DATA::ID => {
33854                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
33855            }
33856            NAMED_VALUE_INT_DATA::ID => {
33857                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
33858            }
33859            NAV_CONTROLLER_OUTPUT_DATA::ID => {
33860                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
33861            }
33862            OBSTACLE_DISTANCE_DATA::ID => {
33863                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
33864            }
33865            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
33866            ONBOARD_COMPUTER_STATUS_DATA::ID => {
33867                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
33868                    .map(Self::ONBOARD_COMPUTER_STATUS)
33869            }
33870            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
33871                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
33872                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
33873            }
33874            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
33875                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
33876                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
33877            }
33878            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
33879                .map(Self::OPEN_DRONE_ID_BASIC_ID),
33880            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
33881                .map(Self::OPEN_DRONE_ID_LOCATION),
33882            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
33883                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
33884                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
33885            }
33886            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
33887                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
33888                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
33889            }
33890            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
33891                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
33892            }
33893            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
33894                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
33895            }
33896            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
33897                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
33898                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
33899            }
33900            OPTICAL_FLOW_DATA::ID => {
33901                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
33902            }
33903            OPTICAL_FLOW_RAD_DATA::ID => {
33904                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
33905            }
33906            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
33907                .map(Self::ORBIT_EXECUTION_STATUS),
33908            PARAM_EXT_ACK_DATA::ID => {
33909                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
33910            }
33911            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
33912                .map(Self::PARAM_EXT_REQUEST_LIST),
33913            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
33914                .map(Self::PARAM_EXT_REQUEST_READ),
33915            PARAM_EXT_SET_DATA::ID => {
33916                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
33917            }
33918            PARAM_EXT_VALUE_DATA::ID => {
33919                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
33920            }
33921            PARAM_MAP_RC_DATA::ID => {
33922                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
33923            }
33924            PARAM_REQUEST_LIST_DATA::ID => {
33925                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
33926            }
33927            PARAM_REQUEST_READ_DATA::ID => {
33928                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
33929            }
33930            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
33931            PARAM_VALUE_DATA::ID => {
33932                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
33933            }
33934            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
33935            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
33936            PLAY_TUNE_V2_DATA::ID => {
33937                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
33938            }
33939            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
33940                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
33941                    .map(Self::POSITION_TARGET_GLOBAL_INT)
33942            }
33943            POSITION_TARGET_LOCAL_NED_DATA::ID => {
33944                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
33945                    .map(Self::POSITION_TARGET_LOCAL_NED)
33946            }
33947            POWER_STATUS_DATA::ID => {
33948                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
33949            }
33950            PROTOCOL_VERSION_DATA::ID => {
33951                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
33952            }
33953            RADIO_STATUS_DATA::ID => {
33954                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
33955            }
33956            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
33957            RAW_PRESSURE_DATA::ID => {
33958                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
33959            }
33960            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
33961            RC_CHANNELS_DATA::ID => {
33962                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
33963            }
33964            RC_CHANNELS_OVERRIDE_DATA::ID => {
33965                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
33966            }
33967            RC_CHANNELS_RAW_DATA::ID => {
33968                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
33969            }
33970            RC_CHANNELS_SCALED_DATA::ID => {
33971                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
33972            }
33973            REQUEST_DATA_STREAM_DATA::ID => {
33974                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
33975            }
33976            REQUEST_EVENT_DATA::ID => {
33977                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
33978            }
33979            RESOURCE_REQUEST_DATA::ID => {
33980                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
33981            }
33982            RESPONSE_EVENT_ERROR_DATA::ID => {
33983                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
33984            }
33985            SAFETY_ALLOWED_AREA_DATA::ID => {
33986                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
33987            }
33988            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
33989                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
33990                    .map(Self::SAFETY_SET_ALLOWED_AREA)
33991            }
33992            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
33993            SCALED_IMU2_DATA::ID => {
33994                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
33995            }
33996            SCALED_IMU3_DATA::ID => {
33997                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
33998            }
33999            SCALED_PRESSURE_DATA::ID => {
34000                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
34001            }
34002            SCALED_PRESSURE2_DATA::ID => {
34003                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
34004            }
34005            SCALED_PRESSURE3_DATA::ID => {
34006                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
34007            }
34008            SCRIPT_COUNT_DATA::ID => {
34009                SCRIPT_COUNT_DATA::deser(version, payload).map(Self::SCRIPT_COUNT)
34010            }
34011            SCRIPT_CURRENT_DATA::ID => {
34012                SCRIPT_CURRENT_DATA::deser(version, payload).map(Self::SCRIPT_CURRENT)
34013            }
34014            SCRIPT_ITEM_DATA::ID => {
34015                SCRIPT_ITEM_DATA::deser(version, payload).map(Self::SCRIPT_ITEM)
34016            }
34017            SCRIPT_REQUEST_DATA::ID => {
34018                SCRIPT_REQUEST_DATA::deser(version, payload).map(Self::SCRIPT_REQUEST)
34019            }
34020            SCRIPT_REQUEST_LIST_DATA::ID => {
34021                SCRIPT_REQUEST_LIST_DATA::deser(version, payload).map(Self::SCRIPT_REQUEST_LIST)
34022            }
34023            SERIAL_CONTROL_DATA::ID => {
34024                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
34025            }
34026            SERVO_OUTPUT_RAW_DATA::ID => {
34027                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
34028            }
34029            SETUP_SIGNING_DATA::ID => {
34030                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
34031            }
34032            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
34033                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34034                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
34035            }
34036            SET_ATTITUDE_TARGET_DATA::ID => {
34037                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
34038            }
34039            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
34040                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
34041            }
34042            SET_HOME_POSITION_DATA::ID => {
34043                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
34044            }
34045            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
34046            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34047                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34048                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
34049            }
34050            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
34051                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34052                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
34053            }
34054            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
34055            SMART_BATTERY_INFO_DATA::ID => {
34056                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
34057            }
34058            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
34059            STORAGE_INFORMATION_DATA::ID => {
34060                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
34061            }
34062            SUPPORTED_TUNES_DATA::ID => {
34063                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
34064            }
34065            SYSTEM_TIME_DATA::ID => {
34066                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
34067            }
34068            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
34069            TERRAIN_CHECK_DATA::ID => {
34070                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
34071            }
34072            TERRAIN_DATA_DATA::ID => {
34073                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
34074            }
34075            TERRAIN_REPORT_DATA::ID => {
34076                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
34077            }
34078            TERRAIN_REQUEST_DATA::ID => {
34079                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
34080            }
34081            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
34082            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
34083                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
34084                    .map(Self::TIME_ESTIMATE_TO_TARGET)
34085            }
34086            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34087                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
34088                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
34089            }
34090            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34091                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
34092                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
34093            }
34094            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
34095            UAVCAN_NODE_INFO_DATA::ID => {
34096                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
34097            }
34098            UAVCAN_NODE_STATUS_DATA::ID => {
34099                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
34100            }
34101            UTM_GLOBAL_POSITION_DATA::ID => {
34102                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
34103            }
34104            V2_EXTENSION_DATA::ID => {
34105                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
34106            }
34107            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
34108            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
34109            VICON_POSITION_ESTIMATE_DATA::ID => {
34110                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
34111                    .map(Self::VICON_POSITION_ESTIMATE)
34112            }
34113            VIDEO_STREAM_INFORMATION_DATA::ID => {
34114                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
34115                    .map(Self::VIDEO_STREAM_INFORMATION)
34116            }
34117            VIDEO_STREAM_STATUS_DATA::ID => {
34118                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
34119            }
34120            VISION_POSITION_ESTIMATE_DATA::ID => {
34121                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34122                    .map(Self::VISION_POSITION_ESTIMATE)
34123            }
34124            VISION_SPEED_ESTIMATE_DATA::ID => {
34125                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
34126            }
34127            WHEEL_DISTANCE_DATA::ID => {
34128                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
34129            }
34130            WIFI_CONFIG_AP_DATA::ID => {
34131                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
34132            }
34133            WINCH_STATUS_DATA::ID => {
34134                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
34135            }
34136            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
34137            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
34138        }
34139    }
34140    fn message_name(&self) -> &'static str {
34141        match self {
34142            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
34143            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
34144            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
34145            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
34146            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
34147            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
34148            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
34149            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
34150            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
34151            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
34152            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
34153            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34154                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
34155            }
34156            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
34157            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
34158            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
34159            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
34160            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
34161            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
34162            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
34163            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
34164            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
34165            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
34166            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
34167            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
34168            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
34169            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
34170            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
34171            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
34172            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
34173            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
34174            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
34175            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
34176            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
34177            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
34178            Self::COLLISION(..) => COLLISION_DATA::NAME,
34179            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
34180            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
34181            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
34182            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
34183            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
34184            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
34185            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
34186            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
34187            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
34188            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
34189            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
34190            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
34191            Self::DEBUG(..) => DEBUG_DATA::NAME,
34192            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
34193            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
34194            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
34195            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
34196            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
34197            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
34198            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
34199            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
34200            Self::EVENT(..) => EVENT_DATA::NAME,
34201            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
34202            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
34203            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
34204            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
34205            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
34206            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
34207            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
34208            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
34209            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
34210            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
34211            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
34212            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
34213            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34214                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
34215            }
34216            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
34217            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
34218            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
34219            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
34220            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
34221            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
34222            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
34223            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
34224            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
34225            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
34226            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
34227            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
34228            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
34229            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
34230            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
34231            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
34232            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
34233            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
34234            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
34235            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
34236            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
34237            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
34238            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
34239            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
34240            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
34241            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
34242            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
34243            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
34244            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
34245            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
34246            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
34247            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
34248            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
34249            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
34250            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34251                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
34252            }
34253            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
34254            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
34255            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
34256            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
34257            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
34258            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
34259            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
34260            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
34261            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
34262            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
34263            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
34264            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
34265            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
34266            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
34267            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
34268            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
34269            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
34270            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
34271            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
34272            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
34273            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
34274            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
34275            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
34276            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
34277            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
34278            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
34279            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
34280            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
34281            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
34282            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
34283            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
34284            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
34285            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
34286            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
34287            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
34288            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
34289            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
34290            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
34291            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
34292            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
34293            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
34294            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
34295            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
34296            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
34297            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
34298            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
34299            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
34300            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
34301            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
34302            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
34303            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
34304            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
34305            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
34306            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
34307            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
34308            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
34309            Self::PING(..) => PING_DATA::NAME,
34310            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
34311            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
34312            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34313            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
34314            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
34315            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
34316            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
34317            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
34318            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
34319            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
34320            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
34321            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
34322            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
34323            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
34324            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
34325            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
34326            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
34327            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
34328            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
34329            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
34330            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
34331            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
34332            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
34333            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
34334            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
34335            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
34336            Self::SCRIPT_COUNT(..) => SCRIPT_COUNT_DATA::NAME,
34337            Self::SCRIPT_CURRENT(..) => SCRIPT_CURRENT_DATA::NAME,
34338            Self::SCRIPT_ITEM(..) => SCRIPT_ITEM_DATA::NAME,
34339            Self::SCRIPT_REQUEST(..) => SCRIPT_REQUEST_DATA::NAME,
34340            Self::SCRIPT_REQUEST_LIST(..) => SCRIPT_REQUEST_LIST_DATA::NAME,
34341            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
34342            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
34343            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
34344            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
34345            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
34346            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
34347            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
34348            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
34349            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34350            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
34351            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
34352            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
34353            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
34354            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
34355            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
34356            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
34357            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
34358            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
34359            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
34360            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
34361            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
34362            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
34363            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
34364            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
34365                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
34366            }
34367            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34368                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
34369            }
34370            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
34371            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
34372            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
34373            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
34374            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
34375            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
34376            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
34377            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
34378            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
34379            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
34380            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
34381            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
34382            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
34383            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
34384            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
34385            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
34386        }
34387    }
34388    fn message_id(&self) -> u32 {
34389        match self {
34390            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
34391            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
34392            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
34393            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
34394            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
34395            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
34396            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
34397            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
34398            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
34399            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
34400            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
34401            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34402                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
34403            }
34404            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
34405            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
34406            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
34407            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
34408            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
34409            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
34410            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
34411            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
34412            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
34413            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
34414            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
34415            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
34416            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
34417            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
34418            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
34419            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
34420            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
34421            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
34422            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
34423            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
34424            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
34425            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
34426            Self::COLLISION(..) => COLLISION_DATA::ID,
34427            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
34428            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
34429            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
34430            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
34431            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
34432            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
34433            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
34434            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
34435            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
34436            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
34437            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
34438            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
34439            Self::DEBUG(..) => DEBUG_DATA::ID,
34440            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
34441            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
34442            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
34443            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
34444            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
34445            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
34446            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
34447            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
34448            Self::EVENT(..) => EVENT_DATA::ID,
34449            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
34450            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
34451            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
34452            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
34453            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
34454            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
34455            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
34456            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
34457            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
34458            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
34459            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
34460            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
34461            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34462                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
34463            }
34464            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
34465            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
34466            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
34467            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
34468            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
34469            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
34470            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
34471            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
34472            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
34473            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
34474            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
34475            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
34476            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
34477            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
34478            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
34479            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
34480            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
34481            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
34482            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
34483            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
34484            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
34485            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
34486            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
34487            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
34488            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
34489            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
34490            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
34491            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
34492            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
34493            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
34494            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
34495            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
34496            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
34497            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
34498            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34499                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
34500            }
34501            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
34502            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
34503            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
34504            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
34505            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
34506            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
34507            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
34508            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
34509            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
34510            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
34511            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
34512            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
34513            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
34514            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
34515            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
34516            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
34517            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
34518            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
34519            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
34520            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
34521            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
34522            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
34523            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
34524            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
34525            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
34526            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
34527            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
34528            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
34529            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
34530            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
34531            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
34532            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
34533            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
34534            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
34535            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
34536            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
34537            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
34538            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
34539            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
34540            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
34541            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
34542            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
34543            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
34544            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
34545            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
34546            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
34547            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
34548            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
34549            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
34550            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
34551            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
34552            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
34553            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
34554            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
34555            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
34556            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
34557            Self::PING(..) => PING_DATA::ID,
34558            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
34559            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
34560            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
34561            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
34562            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
34563            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
34564            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
34565            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
34566            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
34567            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
34568            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
34569            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
34570            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
34571            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
34572            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
34573            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
34574            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
34575            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
34576            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
34577            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
34578            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
34579            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
34580            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
34581            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
34582            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
34583            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
34584            Self::SCRIPT_COUNT(..) => SCRIPT_COUNT_DATA::ID,
34585            Self::SCRIPT_CURRENT(..) => SCRIPT_CURRENT_DATA::ID,
34586            Self::SCRIPT_ITEM(..) => SCRIPT_ITEM_DATA::ID,
34587            Self::SCRIPT_REQUEST(..) => SCRIPT_REQUEST_DATA::ID,
34588            Self::SCRIPT_REQUEST_LIST(..) => SCRIPT_REQUEST_LIST_DATA::ID,
34589            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
34590            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
34591            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
34592            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
34593            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
34594            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
34595            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
34596            Self::SET_MODE(..) => SET_MODE_DATA::ID,
34597            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
34598            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
34599            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
34600            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
34601            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
34602            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
34603            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
34604            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
34605            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
34606            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
34607            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
34608            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
34609            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
34610            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
34611            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
34612            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
34613            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34614                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
34615            }
34616            Self::TUNNEL(..) => TUNNEL_DATA::ID,
34617            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
34618            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
34619            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
34620            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
34621            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
34622            Self::VIBRATION(..) => VIBRATION_DATA::ID,
34623            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
34624            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
34625            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
34626            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
34627            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
34628            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
34629            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
34630            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
34631            Self::WIND_COV(..) => WIND_COV_DATA::ID,
34632        }
34633    }
34634    fn message_id_from_name(name: &str) -> Option<u32> {
34635        match name {
34636            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
34637            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
34638            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
34639            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
34640            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
34641            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
34642            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
34643            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
34644            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
34645            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
34646            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
34647            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
34648                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
34649            }
34650            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
34651            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
34652            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
34653            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
34654            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
34655            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
34656            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
34657            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
34658            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
34659            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
34660            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
34661            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
34662            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
34663            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
34664            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
34665            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
34666            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
34667            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
34668            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
34669            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
34670            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
34671            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
34672            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
34673            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
34674            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
34675            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
34676            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
34677            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
34678            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
34679            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
34680            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
34681            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
34682            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
34683            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
34684            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
34685            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
34686            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
34687            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
34688            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
34689            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
34690            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
34691            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
34692            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
34693            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
34694            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
34695            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
34696            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
34697            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
34698            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
34699            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
34700            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
34701            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
34702            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
34703                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
34704            }
34705            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
34706            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
34707            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
34708            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
34709            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
34710                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
34711            }
34712            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
34713            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
34714            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
34715            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
34716            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
34717                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
34718            }
34719            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
34720            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
34721            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
34722            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
34723            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
34724            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
34725            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
34726            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
34727            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
34728            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
34729            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
34730            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
34731            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
34732            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
34733            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
34734            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
34735            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
34736            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
34737            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
34738            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
34739            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
34740            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
34741            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
34742            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
34743            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
34744            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
34745            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
34746            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
34747            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
34748            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
34749                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
34750            }
34751            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
34752            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
34753            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
34754            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
34755            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
34756            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
34757            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
34758            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
34759            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
34760            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
34761            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
34762            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
34763            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
34764            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
34765            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
34766            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
34767            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
34768            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
34769            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
34770            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
34771            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
34772            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
34773            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
34774            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
34775            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
34776            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
34777            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
34778            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
34779            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
34780            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
34781            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
34782            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
34783            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
34784            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
34785            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
34786            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
34787            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
34788            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
34789            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
34790            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
34791            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
34792            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
34793            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
34794            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
34795            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
34796            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
34797            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
34798            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
34799            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
34800            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
34801            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
34802            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
34803            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
34804            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
34805            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
34806            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
34807            PING_DATA::NAME => Some(PING_DATA::ID),
34808            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
34809            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
34810            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
34811            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
34812            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
34813            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
34814            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
34815            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
34816            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
34817            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
34818            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
34819            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
34820            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
34821            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
34822            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
34823            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
34824            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
34825            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
34826            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
34827            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
34828            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
34829            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
34830            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
34831            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
34832            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
34833            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
34834            SCRIPT_COUNT_DATA::NAME => Some(SCRIPT_COUNT_DATA::ID),
34835            SCRIPT_CURRENT_DATA::NAME => Some(SCRIPT_CURRENT_DATA::ID),
34836            SCRIPT_ITEM_DATA::NAME => Some(SCRIPT_ITEM_DATA::ID),
34837            SCRIPT_REQUEST_DATA::NAME => Some(SCRIPT_REQUEST_DATA::ID),
34838            SCRIPT_REQUEST_LIST_DATA::NAME => Some(SCRIPT_REQUEST_LIST_DATA::ID),
34839            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
34840            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
34841            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
34842            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
34843            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
34844            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
34845            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
34846            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
34847            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
34848                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
34849            }
34850            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
34851                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
34852            }
34853            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
34854            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
34855            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
34856            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
34857            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
34858            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
34859            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
34860            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
34861            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
34862            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
34863            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
34864            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
34865            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
34866            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
34867                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
34868            }
34869            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
34870                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
34871            }
34872            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
34873            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
34874            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
34875            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
34876            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
34877            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
34878            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
34879            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
34880            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
34881            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
34882            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
34883            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
34884            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
34885            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
34886            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
34887            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
34888            _ => None,
34889        }
34890    }
34891    fn default_message_from_id(id: u32) -> Option<Self> {
34892        match id {
34893            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
34894                ACTUATOR_CONTROL_TARGET_DATA::default(),
34895            )),
34896            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
34897                ACTUATOR_OUTPUT_STATUS_DATA::default(),
34898            )),
34899            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
34900            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
34901            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
34902            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
34903            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
34904                ATTITUDE_QUATERNION_DATA::default(),
34905            )),
34906            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
34907                ATTITUDE_QUATERNION_COV_DATA::default(),
34908            )),
34909            ATTITUDE_TARGET_DATA::ID => {
34910                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
34911            }
34912            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
34913            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
34914            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34915                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
34916                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
34917                ))
34918            }
34919            AUTOPILOT_VERSION_DATA::ID => {
34920                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
34921            }
34922            AVAILABLE_MODES_DATA::ID => {
34923                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
34924            }
34925            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
34926                AVAILABLE_MODES_MONITOR_DATA::default(),
34927            )),
34928            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
34929            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
34930            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
34931            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
34932                CAMERA_CAPTURE_STATUS_DATA::default(),
34933            )),
34934            CAMERA_FOV_STATUS_DATA::ID => {
34935                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
34936            }
34937            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
34938                CAMERA_IMAGE_CAPTURED_DATA::default(),
34939            )),
34940            CAMERA_INFORMATION_DATA::ID => {
34941                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
34942            }
34943            CAMERA_SETTINGS_DATA::ID => {
34944                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
34945            }
34946            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
34947                CAMERA_THERMAL_RANGE_DATA::default(),
34948            )),
34949            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
34950                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
34951            )),
34952            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
34953                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
34954            )),
34955            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
34956            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
34957            CAN_FILTER_MODIFY_DATA::ID => {
34958                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
34959            }
34960            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
34961            CELLULAR_CONFIG_DATA::ID => {
34962                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
34963            }
34964            CELLULAR_STATUS_DATA::ID => {
34965                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
34966            }
34967            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
34968                CHANGE_OPERATOR_CONTROL_DATA::default(),
34969            )),
34970            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
34971                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
34972            )),
34973            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
34974            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
34975            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
34976            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
34977            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
34978            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
34979                COMPONENT_INFORMATION_DATA::default(),
34980            )),
34981            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
34982                COMPONENT_INFORMATION_BASIC_DATA::default(),
34983            )),
34984            COMPONENT_METADATA_DATA::ID => {
34985                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
34986            }
34987            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
34988                CONTROL_SYSTEM_STATE_DATA::default(),
34989            )),
34990            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
34991                CURRENT_EVENT_SEQUENCE_DATA::default(),
34992            )),
34993            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
34994            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
34995            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
34996                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
34997            )),
34998            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
34999            DEBUG_FLOAT_ARRAY_DATA::ID => {
35000                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
35001            }
35002            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
35003            DISTANCE_SENSOR_DATA::ID => {
35004                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
35005            }
35006            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
35007            ENCAPSULATED_DATA_DATA::ID => {
35008                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
35009            }
35010            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
35011            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
35012            ESTIMATOR_STATUS_DATA::ID => {
35013                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
35014            }
35015            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
35016            EXTENDED_SYS_STATE_DATA::ID => {
35017                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
35018            }
35019            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
35020            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35021                FILE_TRANSFER_PROTOCOL_DATA::default(),
35022            )),
35023            FLIGHT_INFORMATION_DATA::ID => {
35024                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
35025            }
35026            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
35027            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
35028            GENERATOR_STATUS_DATA::ID => {
35029                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
35030            }
35031            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35032                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
35033            )),
35034            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35035                GIMBAL_DEVICE_INFORMATION_DATA::default(),
35036            )),
35037            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35038                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
35039            )),
35040            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35041                GIMBAL_MANAGER_INFORMATION_DATA::default(),
35042            )),
35043            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35044                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
35045            )),
35046            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35047                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35048                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
35049                ))
35050            }
35051            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35052                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
35053            )),
35054            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35055                GIMBAL_MANAGER_STATUS_DATA::default(),
35056            )),
35057            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35058                GLOBAL_POSITION_INT_DATA::default(),
35059            )),
35060            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35061                GLOBAL_POSITION_INT_COV_DATA::default(),
35062            )),
35063            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35064                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35065                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
35066                ))
35067            }
35068            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
35069            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
35070            GPS_GLOBAL_ORIGIN_DATA::ID => {
35071                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
35072            }
35073            GPS_INJECT_DATA_DATA::ID => {
35074                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
35075            }
35076            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
35077            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
35078            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
35079            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
35080            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
35081            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
35082            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
35083            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
35084            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
35085            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35086                HIL_ACTUATOR_CONTROLS_DATA::default(),
35087            )),
35088            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
35089            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
35090            HIL_OPTICAL_FLOW_DATA::ID => {
35091                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
35092            }
35093            HIL_RC_INPUTS_RAW_DATA::ID => {
35094                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
35095            }
35096            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
35097            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
35098            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35099                HIL_STATE_QUATERNION_DATA::default(),
35100            )),
35101            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
35102            HYGROMETER_SENSOR_DATA::ID => {
35103                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
35104            }
35105            ILLUMINATOR_STATUS_DATA::ID => {
35106                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
35107            }
35108            ISBD_LINK_STATUS_DATA::ID => {
35109                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
35110            }
35111            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
35112            LINK_NODE_STATUS_DATA::ID => {
35113                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
35114            }
35115            LOCAL_POSITION_NED_DATA::ID => {
35116                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
35117            }
35118            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35119                LOCAL_POSITION_NED_COV_DATA::default(),
35120            )),
35121            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35122                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35123                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
35124                ))
35125            }
35126            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
35127            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
35128            LOGGING_DATA_ACKED_DATA::ID => {
35129                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
35130            }
35131            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
35132            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
35133            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
35134            LOG_REQUEST_DATA_DATA::ID => {
35135                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
35136            }
35137            LOG_REQUEST_END_DATA::ID => {
35138                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
35139            }
35140            LOG_REQUEST_LIST_DATA::ID => {
35141                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
35142            }
35143            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
35144            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
35145            MANUAL_SETPOINT_DATA::ID => {
35146                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
35147            }
35148            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
35149            MESSAGE_INTERVAL_DATA::ID => {
35150                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
35151            }
35152            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
35153            MISSION_CLEAR_ALL_DATA::ID => {
35154                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
35155            }
35156            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
35157            MISSION_CURRENT_DATA::ID => {
35158                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
35159            }
35160            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
35161            MISSION_ITEM_INT_DATA::ID => {
35162                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
35163            }
35164            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35165                MISSION_ITEM_REACHED_DATA::default(),
35166            )),
35167            MISSION_REQUEST_DATA::ID => {
35168                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
35169            }
35170            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35171                MISSION_REQUEST_INT_DATA::default(),
35172            )),
35173            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35174                MISSION_REQUEST_LIST_DATA::default(),
35175            )),
35176            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35177                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
35178            )),
35179            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35180                MISSION_SET_CURRENT_DATA::default(),
35181            )),
35182            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35183                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
35184            )),
35185            MOUNT_ORIENTATION_DATA::ID => {
35186                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
35187            }
35188            NAMED_VALUE_FLOAT_DATA::ID => {
35189                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
35190            }
35191            NAMED_VALUE_INT_DATA::ID => {
35192                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
35193            }
35194            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35195                NAV_CONTROLLER_OUTPUT_DATA::default(),
35196            )),
35197            OBSTACLE_DISTANCE_DATA::ID => {
35198                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
35199            }
35200            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
35201            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35202                ONBOARD_COMPUTER_STATUS_DATA::default(),
35203            )),
35204            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35205                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
35206            )),
35207            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35208                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
35209            )),
35210            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35211                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
35212            )),
35213            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35214                OPEN_DRONE_ID_LOCATION_DATA::default(),
35215            )),
35216            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35217                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
35218            )),
35219            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35220                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
35221            )),
35222            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35223                OPEN_DRONE_ID_SELF_ID_DATA::default(),
35224            )),
35225            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35226                OPEN_DRONE_ID_SYSTEM_DATA::default(),
35227            )),
35228            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35229                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
35230            )),
35231            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
35232            OPTICAL_FLOW_RAD_DATA::ID => {
35233                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
35234            }
35235            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35236                ORBIT_EXECUTION_STATUS_DATA::default(),
35237            )),
35238            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
35239            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35240                PARAM_EXT_REQUEST_LIST_DATA::default(),
35241            )),
35242            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35243                PARAM_EXT_REQUEST_READ_DATA::default(),
35244            )),
35245            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
35246            PARAM_EXT_VALUE_DATA::ID => {
35247                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
35248            }
35249            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
35250            PARAM_REQUEST_LIST_DATA::ID => {
35251                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
35252            }
35253            PARAM_REQUEST_READ_DATA::ID => {
35254                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
35255            }
35256            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
35257            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
35258            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
35259            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
35260            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
35261            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35262                POSITION_TARGET_GLOBAL_INT_DATA::default(),
35263            )),
35264            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35265                POSITION_TARGET_LOCAL_NED_DATA::default(),
35266            )),
35267            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
35268            PROTOCOL_VERSION_DATA::ID => {
35269                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
35270            }
35271            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
35272            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
35273            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
35274            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
35275            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
35276            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35277                RC_CHANNELS_OVERRIDE_DATA::default(),
35278            )),
35279            RC_CHANNELS_RAW_DATA::ID => {
35280                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
35281            }
35282            RC_CHANNELS_SCALED_DATA::ID => {
35283                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
35284            }
35285            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35286                REQUEST_DATA_STREAM_DATA::default(),
35287            )),
35288            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
35289            RESOURCE_REQUEST_DATA::ID => {
35290                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
35291            }
35292            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35293                RESPONSE_EVENT_ERROR_DATA::default(),
35294            )),
35295            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35296                SAFETY_ALLOWED_AREA_DATA::default(),
35297            )),
35298            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35299                SAFETY_SET_ALLOWED_AREA_DATA::default(),
35300            )),
35301            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
35302            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
35303            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
35304            SCALED_PRESSURE_DATA::ID => {
35305                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
35306            }
35307            SCALED_PRESSURE2_DATA::ID => {
35308                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
35309            }
35310            SCALED_PRESSURE3_DATA::ID => {
35311                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
35312            }
35313            SCRIPT_COUNT_DATA::ID => Some(Self::SCRIPT_COUNT(SCRIPT_COUNT_DATA::default())),
35314            SCRIPT_CURRENT_DATA::ID => Some(Self::SCRIPT_CURRENT(SCRIPT_CURRENT_DATA::default())),
35315            SCRIPT_ITEM_DATA::ID => Some(Self::SCRIPT_ITEM(SCRIPT_ITEM_DATA::default())),
35316            SCRIPT_REQUEST_DATA::ID => Some(Self::SCRIPT_REQUEST(SCRIPT_REQUEST_DATA::default())),
35317            SCRIPT_REQUEST_LIST_DATA::ID => Some(Self::SCRIPT_REQUEST_LIST(
35318                SCRIPT_REQUEST_LIST_DATA::default(),
35319            )),
35320            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
35321            SERVO_OUTPUT_RAW_DATA::ID => {
35322                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
35323            }
35324            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
35325            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35326                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
35327            )),
35328            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35329                SET_ATTITUDE_TARGET_DATA::default(),
35330            )),
35331            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35332                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
35333            )),
35334            SET_HOME_POSITION_DATA::ID => {
35335                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
35336            }
35337            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
35338            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35339                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
35340            )),
35341            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35342                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
35343            )),
35344            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
35345            SMART_BATTERY_INFO_DATA::ID => {
35346                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
35347            }
35348            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
35349            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35350                STORAGE_INFORMATION_DATA::default(),
35351            )),
35352            SUPPORTED_TUNES_DATA::ID => {
35353                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
35354            }
35355            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
35356            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
35357            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
35358            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
35359            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
35360            TERRAIN_REQUEST_DATA::ID => {
35361                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
35362            }
35363            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
35364            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35365                TIME_ESTIMATE_TO_TARGET_DATA::default(),
35366            )),
35367            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35368                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35369                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
35370                ))
35371            }
35372            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35373                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35374                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
35375                ))
35376            }
35377            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
35378            UAVCAN_NODE_INFO_DATA::ID => {
35379                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
35380            }
35381            UAVCAN_NODE_STATUS_DATA::ID => {
35382                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
35383            }
35384            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35385                UTM_GLOBAL_POSITION_DATA::default(),
35386            )),
35387            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
35388            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
35389            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
35390            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
35391                VICON_POSITION_ESTIMATE_DATA::default(),
35392            )),
35393            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
35394                VIDEO_STREAM_INFORMATION_DATA::default(),
35395            )),
35396            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
35397                VIDEO_STREAM_STATUS_DATA::default(),
35398            )),
35399            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
35400                VISION_POSITION_ESTIMATE_DATA::default(),
35401            )),
35402            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
35403                VISION_SPEED_ESTIMATE_DATA::default(),
35404            )),
35405            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
35406            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
35407            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
35408            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
35409            _ => None,
35410        }
35411    }
35412    #[cfg(feature = "arbitrary")]
35413    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
35414        match id {
35415            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
35416                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35417            )),
35418            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
35419                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
35420            )),
35421            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
35422            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
35423            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
35424            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
35425            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
35426                ATTITUDE_QUATERNION_DATA::random(rng),
35427            )),
35428            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
35429                ATTITUDE_QUATERNION_COV_DATA::random(rng),
35430            )),
35431            ATTITUDE_TARGET_DATA::ID => {
35432                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
35433            }
35434            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
35435            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
35436            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35437                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35438                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
35439                ))
35440            }
35441            AUTOPILOT_VERSION_DATA::ID => {
35442                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
35443            }
35444            AVAILABLE_MODES_DATA::ID => {
35445                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
35446            }
35447            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35448                AVAILABLE_MODES_MONITOR_DATA::random(rng),
35449            )),
35450            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
35451            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
35452            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
35453            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35454                CAMERA_CAPTURE_STATUS_DATA::random(rng),
35455            )),
35456            CAMERA_FOV_STATUS_DATA::ID => {
35457                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
35458            }
35459            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35460                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
35461            )),
35462            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
35463                CAMERA_INFORMATION_DATA::random(rng),
35464            )),
35465            CAMERA_SETTINGS_DATA::ID => {
35466                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
35467            }
35468            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35469                CAMERA_THERMAL_RANGE_DATA::random(rng),
35470            )),
35471            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35472                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
35473            )),
35474            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35475                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
35476            )),
35477            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
35478            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
35479            CAN_FILTER_MODIFY_DATA::ID => {
35480                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
35481            }
35482            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
35483            CELLULAR_CONFIG_DATA::ID => {
35484                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
35485            }
35486            CELLULAR_STATUS_DATA::ID => {
35487                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
35488            }
35489            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
35490                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
35491            )),
35492            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
35493                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
35494            )),
35495            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
35496            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
35497            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
35498            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
35499            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
35500            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35501                COMPONENT_INFORMATION_DATA::random(rng),
35502            )),
35503            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35504                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
35505            )),
35506            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
35507                COMPONENT_METADATA_DATA::random(rng),
35508            )),
35509            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35510                CONTROL_SYSTEM_STATE_DATA::random(rng),
35511            )),
35512            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35513                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
35514            )),
35515            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
35516            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
35517            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35518                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
35519            )),
35520            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
35521            DEBUG_FLOAT_ARRAY_DATA::ID => {
35522                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
35523            }
35524            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
35525            DISTANCE_SENSOR_DATA::ID => {
35526                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
35527            }
35528            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
35529            ENCAPSULATED_DATA_DATA::ID => {
35530                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
35531            }
35532            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
35533            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
35534            ESTIMATOR_STATUS_DATA::ID => {
35535                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
35536            }
35537            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
35538            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
35539                EXTENDED_SYS_STATE_DATA::random(rng),
35540            )),
35541            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
35542            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35543                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
35544            )),
35545            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
35546                FLIGHT_INFORMATION_DATA::random(rng),
35547            )),
35548            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
35549            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
35550            GENERATOR_STATUS_DATA::ID => {
35551                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
35552            }
35553            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35554                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
35555            )),
35556            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35557                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
35558            )),
35559            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35560                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
35561            )),
35562            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35563                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
35564            )),
35565            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35566                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
35567            )),
35568            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35569                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35570                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
35571                ))
35572            }
35573            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35574                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
35575            )),
35576            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35577                GIMBAL_MANAGER_STATUS_DATA::random(rng),
35578            )),
35579            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35580                GLOBAL_POSITION_INT_DATA::random(rng),
35581            )),
35582            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35583                GLOBAL_POSITION_INT_COV_DATA::random(rng),
35584            )),
35585            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35586                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35587                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
35588                ))
35589            }
35590            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
35591            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
35592            GPS_GLOBAL_ORIGIN_DATA::ID => {
35593                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
35594            }
35595            GPS_INJECT_DATA_DATA::ID => {
35596                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
35597            }
35598            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
35599            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
35600            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
35601            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
35602            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
35603            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
35604            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
35605            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
35606            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
35607            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35608                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
35609            )),
35610            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
35611            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
35612            HIL_OPTICAL_FLOW_DATA::ID => {
35613                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
35614            }
35615            HIL_RC_INPUTS_RAW_DATA::ID => {
35616                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
35617            }
35618            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
35619            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
35620            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35621                HIL_STATE_QUATERNION_DATA::random(rng),
35622            )),
35623            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
35624            HYGROMETER_SENSOR_DATA::ID => {
35625                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
35626            }
35627            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
35628                ILLUMINATOR_STATUS_DATA::random(rng),
35629            )),
35630            ISBD_LINK_STATUS_DATA::ID => {
35631                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
35632            }
35633            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
35634            LINK_NODE_STATUS_DATA::ID => {
35635                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
35636            }
35637            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
35638                LOCAL_POSITION_NED_DATA::random(rng),
35639            )),
35640            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35641                LOCAL_POSITION_NED_COV_DATA::random(rng),
35642            )),
35643            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35644                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35645                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
35646                ))
35647            }
35648            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
35649            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
35650            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
35651                LOGGING_DATA_ACKED_DATA::random(rng),
35652            )),
35653            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
35654            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
35655            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
35656            LOG_REQUEST_DATA_DATA::ID => {
35657                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
35658            }
35659            LOG_REQUEST_END_DATA::ID => {
35660                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
35661            }
35662            LOG_REQUEST_LIST_DATA::ID => {
35663                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
35664            }
35665            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
35666            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
35667            MANUAL_SETPOINT_DATA::ID => {
35668                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
35669            }
35670            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
35671            MESSAGE_INTERVAL_DATA::ID => {
35672                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
35673            }
35674            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
35675            MISSION_CLEAR_ALL_DATA::ID => {
35676                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
35677            }
35678            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
35679            MISSION_CURRENT_DATA::ID => {
35680                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
35681            }
35682            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
35683            MISSION_ITEM_INT_DATA::ID => {
35684                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
35685            }
35686            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35687                MISSION_ITEM_REACHED_DATA::random(rng),
35688            )),
35689            MISSION_REQUEST_DATA::ID => {
35690                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
35691            }
35692            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35693                MISSION_REQUEST_INT_DATA::random(rng),
35694            )),
35695            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35696                MISSION_REQUEST_LIST_DATA::random(rng),
35697            )),
35698            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35699                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
35700            )),
35701            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35702                MISSION_SET_CURRENT_DATA::random(rng),
35703            )),
35704            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35705                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
35706            )),
35707            MOUNT_ORIENTATION_DATA::ID => {
35708                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
35709            }
35710            NAMED_VALUE_FLOAT_DATA::ID => {
35711                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
35712            }
35713            NAMED_VALUE_INT_DATA::ID => {
35714                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
35715            }
35716            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35717                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
35718            )),
35719            OBSTACLE_DISTANCE_DATA::ID => {
35720                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
35721            }
35722            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
35723            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35724                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
35725            )),
35726            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35727                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
35728            )),
35729            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35730                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
35731            )),
35732            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35733                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
35734            )),
35735            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35736                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
35737            )),
35738            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35739                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
35740            )),
35741            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35742                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
35743            )),
35744            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35745                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
35746            )),
35747            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35748                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
35749            )),
35750            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35751                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
35752            )),
35753            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
35754            OPTICAL_FLOW_RAD_DATA::ID => {
35755                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
35756            }
35757            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35758                ORBIT_EXECUTION_STATUS_DATA::random(rng),
35759            )),
35760            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
35761            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35762                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
35763            )),
35764            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35765                PARAM_EXT_REQUEST_READ_DATA::random(rng),
35766            )),
35767            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
35768            PARAM_EXT_VALUE_DATA::ID => {
35769                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
35770            }
35771            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
35772            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
35773                PARAM_REQUEST_LIST_DATA::random(rng),
35774            )),
35775            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
35776                PARAM_REQUEST_READ_DATA::random(rng),
35777            )),
35778            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
35779            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
35780            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
35781            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
35782            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
35783            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35784                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
35785            )),
35786            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35787                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
35788            )),
35789            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
35790            PROTOCOL_VERSION_DATA::ID => {
35791                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
35792            }
35793            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
35794            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
35795            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
35796            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
35797            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
35798            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35799                RC_CHANNELS_OVERRIDE_DATA::random(rng),
35800            )),
35801            RC_CHANNELS_RAW_DATA::ID => {
35802                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
35803            }
35804            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
35805                RC_CHANNELS_SCALED_DATA::random(rng),
35806            )),
35807            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35808                REQUEST_DATA_STREAM_DATA::random(rng),
35809            )),
35810            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
35811            RESOURCE_REQUEST_DATA::ID => {
35812                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
35813            }
35814            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35815                RESPONSE_EVENT_ERROR_DATA::random(rng),
35816            )),
35817            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35818                SAFETY_ALLOWED_AREA_DATA::random(rng),
35819            )),
35820            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35821                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
35822            )),
35823            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
35824            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
35825            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
35826            SCALED_PRESSURE_DATA::ID => {
35827                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
35828            }
35829            SCALED_PRESSURE2_DATA::ID => {
35830                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
35831            }
35832            SCALED_PRESSURE3_DATA::ID => {
35833                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
35834            }
35835            SCRIPT_COUNT_DATA::ID => Some(Self::SCRIPT_COUNT(SCRIPT_COUNT_DATA::random(rng))),
35836            SCRIPT_CURRENT_DATA::ID => Some(Self::SCRIPT_CURRENT(SCRIPT_CURRENT_DATA::random(rng))),
35837            SCRIPT_ITEM_DATA::ID => Some(Self::SCRIPT_ITEM(SCRIPT_ITEM_DATA::random(rng))),
35838            SCRIPT_REQUEST_DATA::ID => Some(Self::SCRIPT_REQUEST(SCRIPT_REQUEST_DATA::random(rng))),
35839            SCRIPT_REQUEST_LIST_DATA::ID => Some(Self::SCRIPT_REQUEST_LIST(
35840                SCRIPT_REQUEST_LIST_DATA::random(rng),
35841            )),
35842            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
35843            SERVO_OUTPUT_RAW_DATA::ID => {
35844                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
35845            }
35846            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
35847            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35848                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35849            )),
35850            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35851                SET_ATTITUDE_TARGET_DATA::random(rng),
35852            )),
35853            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35854                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
35855            )),
35856            SET_HOME_POSITION_DATA::ID => {
35857                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
35858            }
35859            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
35860            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35861                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
35862            )),
35863            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35864                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
35865            )),
35866            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
35867            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
35868                SMART_BATTERY_INFO_DATA::random(rng),
35869            )),
35870            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
35871            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35872                STORAGE_INFORMATION_DATA::random(rng),
35873            )),
35874            SUPPORTED_TUNES_DATA::ID => {
35875                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
35876            }
35877            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
35878            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
35879            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
35880            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
35881            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
35882            TERRAIN_REQUEST_DATA::ID => {
35883                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
35884            }
35885            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
35886            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35887                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
35888            )),
35889            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35890                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35891                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
35892                ))
35893            }
35894            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35895                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35896                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
35897                ))
35898            }
35899            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
35900            UAVCAN_NODE_INFO_DATA::ID => {
35901                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
35902            }
35903            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
35904                UAVCAN_NODE_STATUS_DATA::random(rng),
35905            )),
35906            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35907                UTM_GLOBAL_POSITION_DATA::random(rng),
35908            )),
35909            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
35910            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
35911            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
35912            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
35913                VICON_POSITION_ESTIMATE_DATA::random(rng),
35914            )),
35915            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
35916                VIDEO_STREAM_INFORMATION_DATA::random(rng),
35917            )),
35918            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
35919                VIDEO_STREAM_STATUS_DATA::random(rng),
35920            )),
35921            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
35922                VISION_POSITION_ESTIMATE_DATA::random(rng),
35923            )),
35924            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
35925                VISION_SPEED_ESTIMATE_DATA::random(rng),
35926            )),
35927            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
35928            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
35929            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
35930            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
35931            _ => None,
35932        }
35933    }
35934    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
35935        match self {
35936            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
35937            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
35938            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
35939            Self::AIS_VESSEL(body) => body.ser(version, bytes),
35940            Self::ALTITUDE(body) => body.ser(version, bytes),
35941            Self::ATTITUDE(body) => body.ser(version, bytes),
35942            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
35943            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
35944            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
35945            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
35946            Self::AUTH_KEY(body) => body.ser(version, bytes),
35947            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
35948            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
35949            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
35950            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
35951            Self::BATTERY_INFO(body) => body.ser(version, bytes),
35952            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
35953            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
35954            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
35955            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
35956            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
35957            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
35958            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
35959            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
35960            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
35961            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
35962            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
35963            Self::CANFD_FRAME(body) => body.ser(version, bytes),
35964            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
35965            Self::CAN_FRAME(body) => body.ser(version, bytes),
35966            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
35967            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
35968            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
35969            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
35970            Self::COLLISION(body) => body.ser(version, bytes),
35971            Self::COMMAND_ACK(body) => body.ser(version, bytes),
35972            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
35973            Self::COMMAND_INT(body) => body.ser(version, bytes),
35974            Self::COMMAND_LONG(body) => body.ser(version, bytes),
35975            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
35976            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
35977            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
35978            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
35979            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
35980            Self::CURRENT_MODE(body) => body.ser(version, bytes),
35981            Self::DATA_STREAM(body) => body.ser(version, bytes),
35982            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
35983            Self::DEBUG(body) => body.ser(version, bytes),
35984            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
35985            Self::DEBUG_VECT(body) => body.ser(version, bytes),
35986            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
35987            Self::EFI_STATUS(body) => body.ser(version, bytes),
35988            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
35989            Self::ESC_INFO(body) => body.ser(version, bytes),
35990            Self::ESC_STATUS(body) => body.ser(version, bytes),
35991            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
35992            Self::EVENT(body) => body.ser(version, bytes),
35993            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
35994            Self::FENCE_STATUS(body) => body.ser(version, bytes),
35995            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
35996            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
35997            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
35998            Self::FUEL_STATUS(body) => body.ser(version, bytes),
35999            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
36000            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
36001            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
36002            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
36003            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
36004            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
36005            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
36006            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
36007            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
36008            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
36009            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
36010            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36011            Self::GPS2_RAW(body) => body.ser(version, bytes),
36012            Self::GPS2_RTK(body) => body.ser(version, bytes),
36013            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36014            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
36015            Self::GPS_INPUT(body) => body.ser(version, bytes),
36016            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
36017            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
36018            Self::GPS_RTK(body) => body.ser(version, bytes),
36019            Self::GPS_STATUS(body) => body.ser(version, bytes),
36020            Self::HEARTBEAT(body) => body.ser(version, bytes),
36021            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
36022            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
36023            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
36024            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
36025            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
36026            Self::HIL_GPS(body) => body.ser(version, bytes),
36027            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
36028            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
36029            Self::HIL_SENSOR(body) => body.ser(version, bytes),
36030            Self::HIL_STATE(body) => body.ser(version, bytes),
36031            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
36032            Self::HOME_POSITION(body) => body.ser(version, bytes),
36033            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
36034            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
36035            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
36036            Self::LANDING_TARGET(body) => body.ser(version, bytes),
36037            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
36038            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
36039            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
36040            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
36041            Self::LOGGING_ACK(body) => body.ser(version, bytes),
36042            Self::LOGGING_DATA(body) => body.ser(version, bytes),
36043            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
36044            Self::LOG_DATA(body) => body.ser(version, bytes),
36045            Self::LOG_ENTRY(body) => body.ser(version, bytes),
36046            Self::LOG_ERASE(body) => body.ser(version, bytes),
36047            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
36048            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
36049            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
36050            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
36051            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
36052            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
36053            Self::MEMORY_VECT(body) => body.ser(version, bytes),
36054            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
36055            Self::MISSION_ACK(body) => body.ser(version, bytes),
36056            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
36057            Self::MISSION_COUNT(body) => body.ser(version, bytes),
36058            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
36059            Self::MISSION_ITEM(body) => body.ser(version, bytes),
36060            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
36061            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
36062            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
36063            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
36064            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
36065            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
36066            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
36067            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
36068            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
36069            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
36070            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
36071            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
36072            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
36073            Self::ODOMETRY(body) => body.ser(version, bytes),
36074            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
36075            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
36076            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
36077            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
36078            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
36079            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
36080            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
36081            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
36082            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
36083            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
36084            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
36085            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
36086            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
36087            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
36088            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
36089            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
36090            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
36091            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
36092            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
36093            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
36094            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
36095            Self::PARAM_SET(body) => body.ser(version, bytes),
36096            Self::PARAM_VALUE(body) => body.ser(version, bytes),
36097            Self::PING(body) => body.ser(version, bytes),
36098            Self::PLAY_TUNE(body) => body.ser(version, bytes),
36099            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
36100            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36101            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36102            Self::POWER_STATUS(body) => body.ser(version, bytes),
36103            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
36104            Self::RADIO_STATUS(body) => body.ser(version, bytes),
36105            Self::RAW_IMU(body) => body.ser(version, bytes),
36106            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
36107            Self::RAW_RPM(body) => body.ser(version, bytes),
36108            Self::RC_CHANNELS(body) => body.ser(version, bytes),
36109            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
36110            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
36111            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
36112            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
36113            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
36114            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
36115            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
36116            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
36117            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
36118            Self::SCALED_IMU(body) => body.ser(version, bytes),
36119            Self::SCALED_IMU2(body) => body.ser(version, bytes),
36120            Self::SCALED_IMU3(body) => body.ser(version, bytes),
36121            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
36122            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
36123            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
36124            Self::SCRIPT_COUNT(body) => body.ser(version, bytes),
36125            Self::SCRIPT_CURRENT(body) => body.ser(version, bytes),
36126            Self::SCRIPT_ITEM(body) => body.ser(version, bytes),
36127            Self::SCRIPT_REQUEST(body) => body.ser(version, bytes),
36128            Self::SCRIPT_REQUEST_LIST(body) => body.ser(version, bytes),
36129            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
36130            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
36131            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
36132            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36133            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
36134            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36135            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
36136            Self::SET_MODE(body) => body.ser(version, bytes),
36137            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36138            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36139            Self::SIM_STATE(body) => body.ser(version, bytes),
36140            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
36141            Self::STATUSTEXT(body) => body.ser(version, bytes),
36142            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
36143            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
36144            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
36145            Self::SYS_STATUS(body) => body.ser(version, bytes),
36146            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
36147            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
36148            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
36149            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
36150            Self::TIMESYNC(body) => body.ser(version, bytes),
36151            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
36152            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
36153            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
36154            Self::TUNNEL(body) => body.ser(version, bytes),
36155            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
36156            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
36157            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
36158            Self::V2_EXTENSION(body) => body.ser(version, bytes),
36159            Self::VFR_HUD(body) => body.ser(version, bytes),
36160            Self::VIBRATION(body) => body.ser(version, bytes),
36161            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36162            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
36163            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
36164            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36165            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
36166            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
36167            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
36168            Self::WINCH_STATUS(body) => body.ser(version, bytes),
36169            Self::WIND_COV(body) => body.ser(version, bytes),
36170        }
36171    }
36172    fn extra_crc(id: u32) -> u8 {
36173        match id {
36174            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36175            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
36176            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
36177            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
36178            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
36179            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
36180            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
36181            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
36182            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
36183            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
36184            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
36185            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36186                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
36187            }
36188            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
36189            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
36190            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
36191            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
36192            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
36193            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
36194            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
36195            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
36196            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
36197            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
36198            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
36199            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
36200            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
36201            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
36202            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
36203            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
36204            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
36205            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
36206            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
36207            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
36208            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
36209            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
36210            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
36211            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
36212            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
36213            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
36214            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
36215            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
36216            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
36217            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
36218            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
36219            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
36220            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
36221            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
36222            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
36223            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
36224            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
36225            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
36226            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
36227            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
36228            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
36229            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
36230            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
36231            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
36232            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
36233            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
36234            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
36235            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
36236            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
36237            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
36238            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
36239            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
36240            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
36241            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
36242            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
36243            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
36244            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
36245            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36246                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
36247            }
36248            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
36249            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
36250            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
36251            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
36252            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36253                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
36254            }
36255            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
36256            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
36257            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36258            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
36259            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
36260            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
36261            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
36262            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
36263            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
36264            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
36265            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
36266            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
36267            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
36268            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
36269            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
36270            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
36271            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
36272            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
36273            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
36274            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
36275            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
36276            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
36277            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
36278            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
36279            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
36280            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
36281            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
36282            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
36283            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
36284            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36285                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
36286            }
36287            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
36288            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
36289            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
36290            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
36291            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
36292            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
36293            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
36294            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
36295            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
36296            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
36297            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
36298            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
36299            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
36300            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
36301            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
36302            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
36303            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
36304            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
36305            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
36306            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
36307            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
36308            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
36309            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
36310            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
36311            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
36312            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
36313            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
36314            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
36315            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
36316            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
36317            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
36318            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
36319            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
36320            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
36321            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
36322            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
36323            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
36324            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
36325            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
36326            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
36327            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
36328            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
36329            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
36330            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
36331            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
36332            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
36333            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
36334            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
36335            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
36336            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
36337            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
36338            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
36339            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
36340            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
36341            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
36342            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
36343            PING_DATA::ID => PING_DATA::EXTRA_CRC,
36344            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
36345            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
36346            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
36347            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36348            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
36349            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
36350            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
36351            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
36352            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
36353            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
36354            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
36355            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
36356            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
36357            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
36358            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
36359            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
36360            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
36361            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
36362            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
36363            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
36364            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
36365            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
36366            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
36367            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
36368            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
36369            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
36370            SCRIPT_COUNT_DATA::ID => SCRIPT_COUNT_DATA::EXTRA_CRC,
36371            SCRIPT_CURRENT_DATA::ID => SCRIPT_CURRENT_DATA::EXTRA_CRC,
36372            SCRIPT_ITEM_DATA::ID => SCRIPT_ITEM_DATA::EXTRA_CRC,
36373            SCRIPT_REQUEST_DATA::ID => SCRIPT_REQUEST_DATA::EXTRA_CRC,
36374            SCRIPT_REQUEST_LIST_DATA::ID => SCRIPT_REQUEST_LIST_DATA::EXTRA_CRC,
36375            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
36376            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
36377            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
36378            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36379            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
36380            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36381            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
36382            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
36383            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
36384                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
36385            }
36386            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36387            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
36388            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
36389            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
36390            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
36391            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
36392            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
36393            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
36394            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
36395            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
36396            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
36397            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
36398            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
36399            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
36400            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36401                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
36402            }
36403            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36404                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
36405            }
36406            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
36407            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
36408            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
36409            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
36410            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
36411            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
36412            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
36413            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36414            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
36415            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
36416            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36417            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
36418            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
36419            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
36420            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
36421            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
36422            _ => 0,
36423        }
36424    }
36425    fn target_system_id(&self) -> Option<u8> {
36426        match self {
36427            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
36428            Self::CANFD_FRAME(inner) => Some(inner.target_system),
36429            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
36430            Self::CAN_FRAME(inner) => Some(inner.target_system),
36431            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
36432            Self::COMMAND_ACK(inner) => Some(inner.target_system),
36433            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
36434            Self::COMMAND_INT(inner) => Some(inner.target_system),
36435            Self::COMMAND_LONG(inner) => Some(inner.target_system),
36436            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
36437            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
36438            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
36439            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
36440            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
36441            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
36442            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
36443            Self::LOGGING_ACK(inner) => Some(inner.target_system),
36444            Self::LOGGING_DATA(inner) => Some(inner.target_system),
36445            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
36446            Self::LOG_ERASE(inner) => Some(inner.target_system),
36447            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
36448            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
36449            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
36450            Self::MISSION_ACK(inner) => Some(inner.target_system),
36451            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
36452            Self::MISSION_COUNT(inner) => Some(inner.target_system),
36453            Self::MISSION_ITEM(inner) => Some(inner.target_system),
36454            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
36455            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
36456            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
36457            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
36458            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
36459            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
36460            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
36461            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
36462            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
36463            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
36464            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
36465            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
36466            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
36467            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
36468            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
36469            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
36470            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
36471            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
36472            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
36473            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
36474            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
36475            Self::PARAM_SET(inner) => Some(inner.target_system),
36476            Self::PING(inner) => Some(inner.target_system),
36477            Self::PLAY_TUNE(inner) => Some(inner.target_system),
36478            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
36479            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
36480            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
36481            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
36482            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
36483            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
36484            Self::SCRIPT_COUNT(inner) => Some(inner.target_system),
36485            Self::SCRIPT_ITEM(inner) => Some(inner.target_system),
36486            Self::SCRIPT_REQUEST(inner) => Some(inner.target_system),
36487            Self::SCRIPT_REQUEST_LIST(inner) => Some(inner.target_system),
36488            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
36489            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
36490            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
36491            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
36492            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
36493            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
36494            Self::SET_MODE(inner) => Some(inner.target_system),
36495            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
36496            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
36497            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
36498            Self::TIMESYNC(inner) => Some(inner.target_system),
36499            Self::TUNNEL(inner) => Some(inner.target_system),
36500            Self::V2_EXTENSION(inner) => Some(inner.target_system),
36501            _ => None,
36502        }
36503    }
36504    fn target_component_id(&self) -> Option<u8> {
36505        match self {
36506            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
36507            Self::CANFD_FRAME(inner) => Some(inner.target_component),
36508            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
36509            Self::CAN_FRAME(inner) => Some(inner.target_component),
36510            Self::COMMAND_ACK(inner) => Some(inner.target_component),
36511            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
36512            Self::COMMAND_INT(inner) => Some(inner.target_component),
36513            Self::COMMAND_LONG(inner) => Some(inner.target_component),
36514            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
36515            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
36516            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
36517            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
36518            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
36519            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
36520            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
36521            Self::LOGGING_ACK(inner) => Some(inner.target_component),
36522            Self::LOGGING_DATA(inner) => Some(inner.target_component),
36523            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
36524            Self::LOG_ERASE(inner) => Some(inner.target_component),
36525            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
36526            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
36527            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
36528            Self::MISSION_ACK(inner) => Some(inner.target_component),
36529            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
36530            Self::MISSION_COUNT(inner) => Some(inner.target_component),
36531            Self::MISSION_ITEM(inner) => Some(inner.target_component),
36532            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
36533            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
36534            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
36535            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
36536            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
36537            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
36538            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
36539            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
36540            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
36541            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
36542            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
36543            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
36544            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
36545            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
36546            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
36547            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
36548            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
36549            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
36550            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
36551            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
36552            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
36553            Self::PARAM_SET(inner) => Some(inner.target_component),
36554            Self::PING(inner) => Some(inner.target_component),
36555            Self::PLAY_TUNE(inner) => Some(inner.target_component),
36556            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
36557            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
36558            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
36559            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
36560            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
36561            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
36562            Self::SCRIPT_COUNT(inner) => Some(inner.target_component),
36563            Self::SCRIPT_ITEM(inner) => Some(inner.target_component),
36564            Self::SCRIPT_REQUEST(inner) => Some(inner.target_component),
36565            Self::SCRIPT_REQUEST_LIST(inner) => Some(inner.target_component),
36566            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
36567            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
36568            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
36569            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
36570            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
36571            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
36572            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
36573            Self::TIMESYNC(inner) => Some(inner.target_component),
36574            Self::TUNNEL(inner) => Some(inner.target_component),
36575            Self::V2_EXTENSION(inner) => Some(inner.target_component),
36576            _ => None,
36577        }
36578    }
36579}